/**
 * UI Improvements CSS
 * Targeted enhancements for UI consistency and modern design
 */

/* =================================
   ABOUT US PAGE IMPROVEMENTS
================================= */

/* Align Our Team section with Our Reach section */
.about-team-section, .about-team-section .about-container {
  margin-top: 30px;
  padding-left: 0;
  text-align: left;
}

/* Match exact alignment with Our Reach section */
.about-team-section .section-title,
.about-team-section .team-grid {
  margin-left: 0;
  padding-left: 0;
  text-align: left;
}

/* Left-align all cards within their container using Flexbox */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* Left alignment instead of center */
  gap: 30px; /* Increased spacing between cards */
  margin-top: 30px;
}

/* Enhanced card styling */
.team-member {
  flex: 0 0 calc(33.333% - 30px); /* Three columns with consistent width */
  margin-bottom: 30px;
  align-self: flex-start; /* Ensures top alignment */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
  background-color: #fff;
  transform: none !important;
}

.team-member:hover {
  transform: none !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

.team-member:hover .team-member-image img {
  transform: none !important;
}

/* Image styling */
.team-member-image {
  height: 220px;
  overflow: hidden;
}

.team-member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content styling with left alignment */
.team-member-content {
  padding: 20px;
  text-align: left !important;
}

/* Force all text to be left-aligned in team cards */
.team-member-content * {
  text-align: left !important;
}

/* Override any center alignment that might be coming from elsewhere */
.about-team-section .team-grid .team-member .team-member-content,
.about-team-section .team-grid .team-member .team-member-content *,
.team-member h3,
.team-member p {
  text-align: left !important;
}

/* Team member name styling */
.team-member-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--brand-blue);
  text-align: left !important;
  display: block !important;
}

/* Team member title styling */
.team-member-title {
  font-size: 14px;
  color: var(--brand-gold);
  margin-bottom: 15px;
  font-weight: 500;
  text-align: left !important;
  display: block !important;
}

/* Bio text styling */
.team-member-bio {
  font-size: 14px !important;
  line-height: 1.5;
  color: #555;
  text-align: left !important;
}

/* Special override class to force left alignment on problematic elements */
.about-team-section .team-member-content h3,
.about-team-section .team-member-content p,
.about-team-section .team-member .team-member-content .team-member-name,
.about-team-section .team-member .team-member-content .team-member-title,
.about-team-section .team-member .team-member-content .team-member-bio {
  text-align: left !important;
  width: 100% !important;
  display: block !important;
  margin-left: 0 !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

/* Fix for Emmanuel's card and similar examples */
.team-member-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}

/* Apply same alignment to why-choose-us section */
.why-us-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
}

.why-item {
  flex: 0 0 calc(33.333% - 20px);
  align-self: flex-start;
}

/* =================================
   INDEX PAGE IMPROVEMENTS
================================= */

/* Reduce font size of hero buttons for better hierarchy */
.hero-buttons .hero-button {
  font-size: 14px; /* Reduced from 16px or larger */
  letter-spacing: 0.5px;
  padding: 10px 20px;
}

/* Hero content layout improvements */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  width: 100%;
}

/* Button container flexbox */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* =================================
   HERO SECTION SLOGAN IMPROVEMENTS
================================= */

/* Hero section slogan improvements with consistent flexbox layout */
.hero-slogan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 2rem;
}

/* Hero slogan text container */
.hero-slogan .slogan-text {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 7.2rem !important;
  font-weight: 600 !important;
  line-height: 1.3;
  margin-bottom: 2.5rem;
  text-align: center;
}

/* Make both parts of slogan consistent */
.slogan-static, 
.slogan-dynamic {
  font-weight: 600 !important;
  font-size: 3.5rem !important;
  line-height: 1.3;
  display: inline-flex;
}

/* Special styling for dynamic part - ONLY color difference */
.slogan-dynamic {
  color: var(--brand-gold);
  min-height: 40px;
  position: relative;
  margin: 10px;
  justify-content: center;
}

/* =================================
   INDEX PAGE HERO SECTION ENHANCEMENTS
================================= */

/* =================================
   NAVIGATION MENU IMPROVEMENTS
================================= */

/* Space out horizontal spacing between nav links */
.nav-left a {
  margin-right: 25px; /* Standard spacing between most nav items */
}

/* Apply tighter spacing between Services and About Us */
.nav-dropdown {
  margin-right: 10px; /* Reduced spacing before About Us */
}

/* Specifically target About Us to be closer to Services */
.nav-dropdown + a[href="about.php"] {
  margin-left: -5px; /* Negative margin to pull About Us closer to Services */
}

/* Keep standard spacing for other nav items */
a[href="about.php"] + a[href="blog.php"],
a[href="blog.php"] + a[href="contact.php"] {
  margin-left: 0;
  margin-right: 25px;
}

/* Add space to entire nav-left section */
.nav-left {
  gap: 5px; /* Add a small gap between items */
  justify-content: space-between; /* Space items evenly */
}

/* Mobile Services dropdown arrow adjustment */
.mobile-menu-content a[href="services.php"] i.fas.fa-chevron-down,
.dropdown-toggle i.fas.fa-chevron-down {
  margin-left: 2px; /* Bring arrow closer to Services text */
}

/* Target the mobile dropdown icon specifically */
.mobile-dropdown-icon,
.mobile-menu-content a[href="services.php"] i.fas.fa-chevron-down {
  position: absolute !important;
  right: 80px !important; /* Position much closer to the Services text */
  margin-left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 14px !important;
}

/* Modern dropdown menu styling */
.dropdown-menu {
  border-radius: 8px !important; /* Rounded corners */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important; /* Enhanced shadow */
  border-top: 3px solid var(--brand-gold) !important;
  padding: 10px 0 !important;
  background-color: rgba(20, 20, 20, 0.97) !important; /* Slightly more opaque */
  backdrop-filter: blur(10px) !important; /* Enhanced blur effect */
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

/* Enhanced dropdown items */
.dropdown-item {
  padding: 12px 22px !important;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; /* Modern font */
  transition: all 0.2s ease !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; /* Subtle dividers */
}

.dropdown-item:hover {
  background-color: rgba(217, 164, 66, 0.15) !important;
  color: var(--brand-gold) !important;
  transform: translateX(5px) !important; /* Slight movement on hover */
}

/* Last item in dropdown without bottom border */
.dropdown-item:last-child {
  border-bottom: none !important;
}

/* Enhanced dropdown animation */
.nav-dropdown:hover .dropdown-menu {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Subtle hover effect for dropdown toggle */
.dropdown-toggle:hover {
  color: var(--brand-gold) !important;
}

/* Mobile menu specific adjustments */
@media (max-width: 768px) {
  /* Tighter mobile menu dropdown arrow */
  .mobile-menu-content a[href="services.php"] {
    position: relative;
    text-align: center;
  }
  
  /* Force arrow positioning for mobile dropdown */
  .mobile-menu-content a[href="services.php"] i,
  .mobile-menu-content a[href="services.php"] .mobile-dropdown-icon {
    position: absolute !important;
    right: 80px !important; /* Position arrow much closer to text */
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 14px !important;
  }
  
  /* Responsive adjustments */
  .team-member {
    flex: 0 0 100%; /* Full width on mobile */
  }
  
  .why-item {
    flex: 0 0 100%; /* Full width on mobile */
  }
  
  /* Enhanced slogan styling for mobile */
  .slogan-static, 
  .slogan-dynamic {
    font-size: 2.2rem !important; /* Smaller but still prominent on mobile */
    margin: 5px;
    line-height: 1.2;
  }
  
  .hero-slogan .slogan-text {
    margin-bottom: 1.5rem;
  }
}
