/* 
============================
   NAVBAR
============================ 
*/

.navbar {
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
  font-size: 1.3rem;
  background: var(--bg);
  padding: 0.3rem 1rem; /* Reduced from default Bootstrap padding */
  min-height: 50px; /* Set a smaller fixed height */
}

.navbar.hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s;
}
.navbar .navbar-brand {
  display: flex;
  align-items: center;
  padding-left: 75px;
  padding-top: 0.2rem; /* Reduced top padding */
  padding-bottom: 0.2rem; /* Reduced bottom padding */
}

.navbar-nav li {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 18px;
}

.navbar-nav .nav-link {
  position: relative;
  color: var(--words);
  text-transform: uppercase;
  font-weight: 400;
  padding: 0.3rem 0.4rem; /* Reduced vertical padding */
  transition: color 0.5s ease;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: rgba(7, 100, 157, 1);
  transition: width 0.4s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

.nav-item.dropdown {
  position: relative;
}

/* Capabilities Drop Down */

.capabilities-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--words);
  text-decoration: none;
}

.capabilities-link .arrow-icon {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--words);
  transition: transform 0.3s ease;
}

.capabilities-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background-color: #1f1f1f;
  border: 1px solid rgba(0, 130, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 130, 255, 0.3);
  padding: 0.75rem 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.nav-item.dropdown:hover .arrow-icon {
  transform: rotate(90deg);
}

.nav-item.dropdown:hover .capabilities-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item.dropdown:hover .capabilities-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Individual link items */
.capabilities-dropdown a {
  display: block;
  color: var(--words);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  margin: 0.5rem 0;
  transition: color 0.3s ease;
}

.capabilities-dropdown a:hover {
  color: var(--hover);
}

.capabilities-dropdown li {
  margin: 0.5rem 0;
}

.capabilities-dropdown a {
  color: var(--words);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: block;
  transition: color 0.3s ease;
}

.capabilities-dropdown a:hover {
  color: var(--hover);
}

/* About Drop Down */

.about-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--words);
  text-decoration: none;
}

.about-link .arrow-icon {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--words);
  transition: transform 0.3s ease;
}

.about-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background-color: #1f1f1f;
  border: 1px solid rgba(0, 130, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 130, 255, 0.3);
  padding: 0.75rem 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.nav-item.dropdown:hover .about-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item.dropdown:hover .about-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Contacts Drop Down */

.contacts-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
}

.contacts-link .arrow-icon {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--words);
  transition: transform 0.3s ease;
}

.contacts-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background-color: #1f1f1f;
  border: 1px solid rgba(0, 130, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 130, 255, 0.3);
  padding: 0.75rem 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.nav-item.dropdown:hover .contacts-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.contacts-dropdown li {
  margin: 0.5rem 0;
}

.contacts-dropdown a {
  color: var(--words);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: block;
  transition: color 0.3s ease;
}

.contacts-dropdown a:hover {
  color: var(--hover);
}

/* Simple Search Component */

.navbar-search {
  margin-left: 1rem;
}

.search-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: var(--words);
  padding: 6px 15px;
  font-size: 0.85rem;
  width: 200px;
  transition: all 0.3s ease;
  height: 32px;
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(0, 191, 255, 0.3);
  width: 240px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Search Results Dropdown */

.search-results {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  background: #1f1f1f;
  border: 1px solid rgba(0, 191, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 5px;
  display: none;
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--words);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background: rgba(0, 191, 255, 0.1);
  color: var(--words);
  text-decoration: none;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--accent);
}

.search-result-preview {
  font-size: 0.85rem;
  color: var(--words-secondary);
  line-height: 1.3;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--words-secondary);
  font-style: italic;
}

/* Highlight matches */
.search-results mark {
    background: rgba(0, 191, 255, 0.3);
    /*color: var(--accent);*/
    color: #ffffff;
    font-weight: 500;
    /*padding: 1px 2px;*/
    border-radius: 2px;
}

/* Mobile responsiveness for search */
@media (max-width: 991px) {
  .navbar-search {
    margin-left: 0;
    margin-top: 1rem;
    width: 100%;
  }
  
  .search-container {
    width: 100%;
  }
  
  .search-input {
    width: 100%;
  }
  
  .search-input:focus {
    width: 100%;
  }
  
  .search-results {
    width: 100%;
    right: 0;
  }
}
