/* Modern Header Styles */

/* Override legacy header styles */
header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  z-index: 9999 !important;
  height: auto !important;
}

/* Hide legacy navbar elements */
.nav-bar,
.navbar,
header .nav-bar,
header .navbar,
header .container {
  display: none !important;
}

/* Modern Header */
.modern-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  background: transparent !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

.modern-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  opacity: 1;
  backdrop-filter: blur(20px);
  transition: opacity 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modern-header.scrolled::before {
  opacity: 1;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.header-bg-effects {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.header-blur-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-gradient-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #02859F;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-header.scrolled .header-gradient-line {
  opacity: 1;
}

.header-container {
  display: flex;
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  flex-direction: column;
}

.header-content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 4.5rem !important;
  position: relative;
}

.header-logo-section {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  z-index: 20;
}

.header-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.header-logo-img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.header-logo-link:hover .header-logo-img {
  transform: scale(1.05);
}

.header-logo-text {
  background: #02859F;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.header-nav {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

.header-nav-links {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #000000;
  /* background: rgba(2, 133, 159, 0.08); */
  transform: translateY(-1px);
}

.nav-link.active {
  color: #000000;
  background: rgba(2, 133, 159, 0.12);
  border: 1px solid rgba(2, 133, 159, 0.3);
}

.nav-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #3b82f6;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.nav-link:hover .nav-indicator {
  opacity: 1;
  transform: scale(1.2);
}

.nav-link.active .nav-indicator {
  background: #06b6d4;
  opacity: 1;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

/* ===== DROPDOWN STYLES ===== */

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
  margin-left: 0.25rem;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: -200px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  padding: 0.5rem;
  margin: 0;
  list-style: none;
  min-width: 280px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.dropdown-menu li:not(:last-child) {
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  width: 100%;
}

.dropdown-link:hover {
  color: #02859F;
  background: rgba(2, 133, 159, 0.08);
  transform: translateX(4px);
}

.dropdown-link.active {
  color: #02859F;
  background: rgba(2, 133, 159, 0.12);
  border: 1px solid rgba(2, 133, 159, 0.2);
}

.dropdown-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(2, 133, 159, 0.1);
  border-radius: 0.5rem;
  color: #02859F;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dropdown-link:hover .dropdown-icon {
  background: #02859F;
  color: white;
  transform: scale(1.1);
}

.dropdown-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.dropdown-title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
}

.dropdown-subtitle {
  font-size: 0.75rem;
  opacity: 0.7;
  line-height: 1.2;
}

/* ===== MOBILE DROPDOWN STYLES ===== */

.mobile-nav-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}

.mobile-nav-section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  font-weight: 600;
  color: #374151;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.mobile-nav-subsection {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 1rem;
}

.mobile-nav-subsection .mobile-nav-link {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-subsection .mobile-nav-link:hover {
  background: rgba(2, 133, 159, 0.2);
  border-color: rgba(2, 133, 159, 0.3);
  transform: translateX(8px);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #22c55e;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #02859F;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.header-cta-btn:hover {
  transform: translateY(-2px);
  /* box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3); */
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(2, 133, 159, 0.1);
  border: 1px solid rgba(2, 133, 159, 0.2);
  border-radius: 0.75rem;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
}

.mobile-nav-toggle:hover {
  background: rgba(2, 133, 159, 0.15);
  border-color: rgba(2, 133, 159, 0.3);
  transform: scale(1.05);
}

.mobile-nav-toggle:active {
  transform: scale(0.95);
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hamburger-line {
  width: 1.25rem;
  height: 2px;
  background: #02859F;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.mobile-nav-toggle:hover .hamburger-line {
  background: #016c7f;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(0.375rem, 0.375rem);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(0.375rem, -0.375rem);
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  backdrop-filter: blur(20px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
}

.mobile-nav-overlay.active .mobile-nav-content {
  transform: translateY(0);
}

/* Mobile Navigation Header */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.mobile-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-logo-img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(2, 133, 159, 0.2);
}

.mobile-logo-text {
  color: #1f2937;
  font-weight: 800;
  font-size: 1.25rem;
}

.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: rgba(2, 133, 159, 0.1);
  border: 1px solid rgba(2, 133, 159, 0.2);
  border-radius: 50%;
  color: #02859F;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-nav-close:hover {
  background: #02859F;
  border-color: #02859F;
  color: white;
  transform: scale(1.1) rotate(90deg);
}

.mobile-nav-close:active {
  transform: scale(0.95);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 2rem;
  margin-bottom: auto;
  flex: 1;
  overflow-y: auto;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: rgba(31, 41, 55, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  transform: translateX(-20px);
  opacity: 0;
  animation: slideInLeft 0.6s ease forwards;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-link:nth-child(2) { animation-delay: 0.2s; }
.mobile-nav-link:nth-child(3) { animation-delay: 0.3s; }
.mobile-nav-link:nth-child(4) { animation-delay: 0.4s; }
.mobile-nav-link:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInLeft {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.mobile-nav-link:hover {
  color: #02859F;
  background: rgba(2, 133, 159, 0.08);
  border-color: rgba(2, 133, 159, 0.2);
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 8px 25px rgba(2, 133, 159, 0.15);
}

.mobile-nav-link.active {
  color: #02859F;
  background: rgba(2, 133, 159, 0.15);
  border-color: rgba(2, 133, 159, 0.3);
  box-shadow: 0 0 20px rgba(2, 133, 159, 0.2);
}

.mobile-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(2, 133, 159, 0.1);
  border-radius: 0.75rem;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.mobile-nav-link:hover .mobile-nav-icon {
  background: rgba(2, 133, 159, 0.2);
  transform: scale(1.1) rotate(5deg);
}

.mobile-nav-contact {
  margin-top: auto;
  padding: 2rem;
  background: rgba(249, 250, 251, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
}

.mobile-contact-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 1rem;
}

.mobile-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #4b5563;
  font-size: 0.875rem;
}

/* Tablet and Mobile Styles */
@media (max-width: 992px) {
  /* Hide desktop navigation on tablets too */
  .header-nav,
  .header-nav-links,
  .nav-dropdown,
  .dropdown-menu {
    display: none !important;
  }
  
  .header-cta-btn {
    display: none;
  }
  
  .mobile-nav-toggle {
    display: flex !important;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }
  
  .header-content {
    height: 4rem;
  }
  
  .header-logo-img {
    width: 2rem;
    height: 2rem;
  }
  
  .header-logo-link {
    font-size: 1.125rem;
  }
  
  /* Hide all desktop navigation elements */
  .header-nav,
  .header-nav-links,
  .nav-dropdown,
  .dropdown-menu,
  .nav-link,
  .dropdown-toggle,
  .dropdown-link {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  
  .header-status {
    display: none;
  }
  
  .header-cta-btn {
    display: none;
  }
  
  .mobile-nav-toggle {
    display: flex !important;
  }
}

/* Force visibility of modern header components */
.modern-header .header-container,
.modern-header .header-content,
.modern-header .header-logo-section,
.modern-header .header-nav {
  display: flex !important;
}

/* Box sizing reset */
.modern-header,
.modern-header * {
  box-sizing: border-box !important;
}

/* JavaScript-enhanced styles */
.js .modern-header {
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.js .modern-header.scrolled {
  /* backdrop-filter: blur(20px) saturate(180%); */
  background: rgba(17, 25, 40, 0.95) !important;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.js .modern-header.scrolled .header-logo img {
  filter: brightness(1.2) saturate(1.1);
}

.js .modern-header.scrolled .header-nav .nav-link {
  color: rgba(0, 0, 0, 0.95);
}

.js .modern-header.scrolled .header-nav .nav-link:hover {
  color: #60a5fa;
}

/* Mobile navigation active states */
.js .mobile-nav-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.js .mobile-nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.js .mobile-nav-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.js .mobile-nav-overlay.active {
  visibility: visible;
  opacity: 1;
  backdrop-filter: blur(10px);
}

.js .mobile-nav-overlay.active .mobile-nav-content {
  transform: translateY(0);
  opacity: 1;
}
