/**
 * Navigation — Bootstrap Navbar + TrustClarity styling
 * Uses Bootstrap 5.3 navbar with collapse plugin
 * https://getbootstrap.com/docs/5.3/components/navbar/
 */

/* TrustClarity Navbar overrides */
.tc-navbar {
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid #d4e6f0;
  padding: 16px 0;
  z-index: 1000;
}

.tc-navbar .navbar-brand img {
  height: 40px;
  width: auto;
  transition: transform 0.2s ease;
}

.tc-navbar .navbar-brand:hover img {
  transform: scale(1.05);
}

.tc-navbar .nav-link {
  color: #0f172a;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px !important;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tc-navbar .nav-link:hover,
.tc-navbar .nav-link:focus,
.tc-navbar .nav-link.active {
  color: #0aace4;
  text-decoration: none;
}

.tc-navbar .nav-link:not(.dropdown-toggle)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background-color: #0aace4;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tc-navbar .nav-link:hover:not(.dropdown-toggle)::after {
  transform: scaleX(1);
}

/* Tools dropdown in navbar — button styled like nav-link */
.tc-navbar .nav-item.dropdown .dropdown-toggle,
.tc-navbar .nav-item.dropdown .dropdown-toggle:hover,
.tc-navbar .nav-item.dropdown .dropdown-toggle:focus,
header .dropdown .dropdown-toggle,
header .dropdown .dropdown-toggle:hover,
header .dropdown .dropdown-toggle:focus {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 12px;
  font: inherit;
  color: #0f172a;
  cursor: pointer;
}

header .dropdown .dropdown-toggle:hover,
header .dropdown .dropdown-toggle:focus {
  color: #0aace4;
}

.tc-navbar .nav-item.dropdown .dropdown-toggle {
  position: relative;
}

.tc-navbar .nav-item.dropdown .dropdown-toggle::after {
  margin-left: 0.35em;
  vertical-align: 0.255em;
}

.tc-navbar .nav-item.dropdown .dropdown-toggle:hover,
.tc-navbar .nav-item.dropdown .dropdown-toggle:focus,
.tc-navbar .nav-item.dropdown.show .dropdown-toggle {
  color: #0aace4;
}

.tc-navbar .dropdown-menu {
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
  padding: 0.5rem 0;
}

.tc-navbar .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 14px;
  position: relative;
}

/* Highlight on hover (no underline) */
.tc-navbar .dropdown-item:hover,
.tc-navbar .dropdown-item:focus {
  background-color: #f0f9ff;
  color: #0aace4;
}

/* Mobile: stacked nav, CTA full-width */
@media (max-width: 991.98px) {
  .tc-navbar .navbar-collapse {
    padding-top: 16px;
  }

  .tc-navbar .nav-link {
    padding: 12px 0 !important;
    border-bottom: 1px solid #f1f5f9;
  }

  .tc-navbar .nav-link::after {
    display: none;
  }

  .tc-navbar .btn {
    width: 100%;
    margin-top: 12px;
  }
}

/* Legacy header support (other pages) */
.site-header,
header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid #d4e6f0;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
}

/* Popup Modal System */
.popup-wrap-new {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.popup-wrap-new.active {
  display: flex;
}

.popup-wrap-new .popup-content {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  animation: tc-modal-slide-up 0.3s ease;
}

@keyframes tc-modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-pop {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #71717a;
  transition: color 0.2s ease;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-pop:hover {
  color: #0f172a;
}

@media (max-width: 768px) {
  .popup-wrap-new .popup-content {
    padding: 24px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
