/* Site Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: backdrop-filter 0.3s ease, background 0.3s ease;
  z-index: 1000;
}

.site-header.scrolled {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.35);
}

.header-container {
  padding: 0.75rem 1.5rem !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px !important;
}

.logo img {
  height: 50px !important;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a,
.nav-links .dropdown-toggle {
  /* margin-left: 1rem; */
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s ease;
  background: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links .dropdown-toggle:hover,
.nav-links a.active {
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
}

/* Bootstrap Dropdown Styling */
.nav-dropdown {
  position: relative;
}

.nav-dropdown .dropdown-menu {
  border: 1px solid rgba(16, 132, 195, 0.2);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 0.5rem !important;
  width: max-content;
  /* Center below the button */
  left: 50% !important;
  transform: translateX(-50%) !important;
  right: auto !important;
}

.nav-dropdown .dropdown-item {
  color: var(--dark);
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-dropdown .dropdown-item:hover {
  background: rgba(16, 132, 195, 0.1);
  color: var(--primary);
}

.nav-dropdown .dropdown-item i {
  margin-right: 0.5rem;
  color: var(--primary);
  width: 20px;
  text-align: center;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.social-icons a {
  color: var(--dark);
  font-size: 1.2rem;
  transition: color 0.3s ease;
  margin: 0;
}

.social-icons a:hover {
  color: var(--primary);
}

/* Mobile Navigation */
@media (max-width: 1024px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 70%;
    max-width: 320px;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 5rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    gap: 0;
    overflow-y: auto;
  }

  .nav-links.open,
  .nav-links.mobile-nav-active {
    right: 0;
  }

  .nav-links a,
  .nav-links .dropdown-toggle {
    margin: 0.5rem 0;
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    border-radius: 8px;
    width: 100%;
    text-align: center;
  }

  .nav-links a:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(-5px);
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown .dropdown-menu {
    position: static !important;
    transform: none !important;
    border: none;
    box-shadow: none;
    background: rgba(16, 132, 195, 0.05);
    margin: 0.5rem 0;
    width: 100%;
  }

  .social-icons {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    border-left: none;
    justify-content: center;
    padding-left: 0;
  }

  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
    z-index: 1001;
    position: relative;
  }

  .hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: absolute;
  }

  .hamburger-line:nth-child(1) {
    top: 14px;
  }

  .hamburger-line:nth-child(2) {
    top: 19px;
  }

  .hamburger-line:nth-child(3) {
    top: 24px;
  }

  .menu-open .hamburger-line:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
  }

  .menu-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .menu-open .hamburger-line:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
  }

  .mobile-menu-toggle:hover .hamburger-line {
    background-color: var(--accent-color);
  }

  .header-container {
    padding: 1rem 1.5rem;
  }
}

/* Component System Classes (for component-based pages) */
.csi-component-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: backdrop-filter 0.3s ease, background 0.3s ease;
  z-index: 1000;
}

.csi-component-header.scrolled {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.35);
}

.csi-component-header-container {
  padding: 0.75rem 1.5rem !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px !important;
}

.csi-component-logo img,
.csi-component-logo-img {
  height: 50px !important;
  width: auto;
  display: block;
}

.csi-component-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.csi-component-nav-link {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

.csi-component-nav-link:hover,
.csi-component-nav-link.active {
  color: var(--primary);
}

.csi-component-menu-toggle {
  display: none;
}

.csi-component-social {
  display: flex;
  gap: 1rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.csi-component-social-link {
  color: var(--dark);
  font-size: 1.2rem;
  transition: color 0.3s ease;
  margin: 0;
}

.csi-component-social-link:hover {
  color: var(--primary);
}

@media (max-width: 1024px) {
  .csi-component-nav {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 70%;
    max-width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 5rem 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
    overflow-y: auto;
  }

  .csi-component-nav.open,
  .csi-component-nav.mobile-nav-active {
    right: 0;
  }

  .csi-component-nav-link {
    margin: 0.5rem 0;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 100%;
    text-align: center;
  }

  .csi-component-nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(-5px);
  }

  .csi-component-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
    z-index: 1001;
    position: relative;
  }

  .csi-component-hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: absolute;
  }

  .csi-component-hamburger-line:nth-child(1) {
    top: 14px;
  }

  .csi-component-hamburger-line:nth-child(2) {
    top: 19px;
  }

  .csi-component-hamburger-line:nth-child(3) {
    top: 24px;
  }

  .menu-open .csi-component-hamburger-line:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
  }

  .menu-open .csi-component-hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .menu-open .csi-component-hamburger-line:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
  }

  .csi-component-menu-toggle:hover .csi-component-hamburger-line {
    background-color: var(--accent-color);
  }

  .csi-component-social {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    border-left: none;
    justify-content: center;
    padding-left: 0;
  }
}