/* Main Styles */

/* Dropdown Menu Fixes */
.dropdown-menu {
  max-height: 80vh;
  padding: 0.8rem 0;
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  margin-top: 10px;
  background-color: #ffffff;
  animation: fadeInDown 0.3s ease-out;
  transform-origin: top center;
  border-top: 3px solid #f0a500;
  /* Default - hide scrollbars for all dropdowns */
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.dropdown-menu::-webkit-scrollbar {
  display: none;
}

/* Dropdown menu arrow pointer */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #f0a500;
}

/* Specific styling for service areas dropdown only */
#areasDropdown + .dropdown-menu {
  overflow-y: scroll; /* Show vertical scrollbar only for service areas */
  overflow-x: hidden; /* Hide horizontal scrollbar */
  scrollbar-width: thin; /* Firefox */
  -ms-overflow-style: thin; /* IE and Edge */
}

/* Show scrollbar for service areas dropdown only in Chrome, Safari and Opera */
#areasDropdown + .dropdown-menu::-webkit-scrollbar {
  display: block;
  width: 6px;
  height: 0; /* No horizontal scrollbar */
}

#areasDropdown + .dropdown-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#areasDropdown + .dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(58, 77, 180, 0.3);
  border-radius: 10px;
}

#areasDropdown + .dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(58, 77, 180, 0.5);
}

/* Prevent dropdown from disappearing on hover out */
.dropdown {
  position: relative;
}

/* Ensure dropdown remains visible when moving from nav-link to dropdown content */
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover,
.dropdown-menu.show {
  display: block;
  visibility: visible;
  opacity: 1;
}

/* Add extra hover space to prevent gaps */
.dropdown::after {
  content: "";
  position: absolute;
  height: 20px;
  width: 100%;
  bottom: -20px;
  left: 0;
  z-index: 999;
}

.dropdown-menu li {
  display: block;
}

/* Special styling for All Service Areas link */
.all-areas-link {
  color: #3a4db4 !important;
  font-weight: 700;
  background-color: rgba(240, 165, 0, 0.05);
  border-bottom: 1px solid rgba(240, 165, 0, 0.1);
}

.all-areas-link:hover {
  background-color: rgba(58, 77, 180, 0.1) !important;
  color: #2c3c99 !important;
}

/* Enhanced Service Areas Section Styling */
.service-area-content-section {
  position: relative;
  padding: 80px 0 !important;
  background: linear-gradient(
    135deg,
    rgba(248, 249, 250, 1) 0%,
    rgba(240, 240, 245, 1) 100%
  );
  overflow: hidden;
}

.service-area-content-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233a4db4' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: 0;
}

.service-area-content-section .container {
  position: relative;
  z-index: 1;
}

.service-area-content-section .section-title {
  color: #3a4db4;
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

.service-area-content-section .section-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #3a4db4, #f0a500);
  border-radius: 2px;
}

.service-areas-grid {
  margin-top: 30px;
}

.service-area-card {
  background: #ffffff;
  border-radius: 15px;
  padding: 30px;
  height: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-area-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #3a4db4, #f0a500);
}

.service-area-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(58, 77, 180, 0.15);
}

.service-area-card h3 {
  color: #3a4db4;
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(58, 77, 180, 0.1);
  font-weight: 700;
}

.city-list {
  list-style: none;
  padding: 0;
  margin: 0;
  column-count: 2;
  column-gap: 20px;
}

.city-list li {
  margin-bottom: 10px;
  break-inside: avoid;
  position: relative;
  padding-left: 20px;
}

.city-list li::before {
  content: "\f3c5"; /* Font Awesome map marker icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 5px;
  color: #f0a500;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.city-list li:hover::before {
  color: #3a4db4;
  opacity: 1;
  transform: scale(1.2);
}

.city-list a {
  color: #555;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 500;
}

.city-list a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3a4db4, #f0a500);
  transition: width 0.3s ease;
  border-radius: 5px;
}

.city-list a:hover {
  color: #3a4db4;
}

.city-list a:hover::after {
  width: 100%;
}

/* Service Area Content Styles */
.service-area-content {
  background: #ffffff;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 30px;
}

.service-area-content h3 {
  color: #3a4db4;
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 700;
}

/* Service Highlight Cards */
.service-highlight-card {
  background: #ffffff;
  border-radius: 15px;
  padding: 30px;
  height: 100%;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-highlight-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(58, 77, 180, 0.15);
}

.service-highlight-card .card-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #3a4db4, #2c3c99);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(58, 77, 180, 0.3);
}

.service-highlight-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, #f0a500, #ffb01f);
  box-shadow: 0 10px 25px rgba(240, 165, 0, 0.4);
}

.service-highlight-card .card-icon i {
  font-size: 2.2rem;
  color: #ffffff;
}

.service-highlight-card h4 {
  color: #3a4db4;
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.service-highlight-card p {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 991.98px) {
  .city-list {
    column-count: 1;
  }

  .service-area-card,
  .service-area-content,
  .service-highlight-card {
    padding: 25px;
  }

  .service-area-content-section .section-title {
    font-size: 2.2rem;
  }
}

/* Remove general scrollbar styling as we're now targeting specifically */
.dropdown-item {
  padding: 0.7rem 1.5rem;
  display: block;
  width: 100%;
  clear: both;
  font-weight: 500;
  text-align: inherit;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  color: #333;
  position: relative;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-left: 0 solid #3a4db4;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(58, 77, 180, 0.05);
  color: #3a4db4;
  padding-left: 2rem;
  border-left: 4px solid #3a4db4;
}

.dropdown-item:active {
  background-color: rgba(58, 77, 180, 0.1);
  color: #2c3c99;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 992px) {
  .dropdown-menu {
    border: none;
    max-height: none;
    overflow-y: visible;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
    padding-left: 1rem;
    animation: none;
    border-top: none;
    border-left: 1px solid rgba(58, 77, 180, 0.2);
  }

  .navbar-nav .dropdown-menu {
    position: static;
    float: none;
    background-color: transparent;
  }

  .dropdown-menu::before {
    display: none;
  }

  .dropdown-item {
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.8);
  }

  .dropdown-item:hover,
  .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f0a500;
  }
}

/* Mobile menu styling */
@media (max-width: 991.98px) {
  /* Mobile navbar background */
  .navbar-collapse {
    background: linear-gradient(135deg, #3a4db4, #2c3c99);
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  /* Mobile menu text color */
  .navbar-nav .nav-link {
    color: #ffffff !important;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Mobile dropdown menu styling */
  .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 0;
    margin-top: 0;
    box-shadow: none;
    padding-left: 15px;
  }

  /* Mobile dropdown menu items */
  .dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
  }

  .dropdown-item:hover,
  .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f0a500 !important;
  }

  /* Hide dropdown arrow in mobile */
  .dropdown-menu::before {
    display: none;
  }

  /* Custom divider color */
  .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
  }
}
