/**
 * Professional Header Styles
 * Modern, clean, and production-ready header design
 */

/* ============================================
   TOP BAR STYLES
   ============================================ */
.professional-topbar {
  background: linear-gradient(135deg, #003d82 0%, #0077b6 100%);
  color: #ffffff;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-link {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.topbar-link:hover {
  color: #90e0ef;
  transform: translateX(3px);
}

.topbar-link i {
  font-size: 16px;
}

.topbar-text {
  color: rgba(255, 255, 255, 0.9);
  margin-right: 5px;
}

.social-link {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #ffffff;
  color: #0077b6;
  transform: translateY(-3px);
}

/* ============================================
   MAIN HEADER STYLES
   ============================================ */
.professional-header {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.professional-header .container {
  position: relative;
}

.professional-header.sticky {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.main-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  position: relative;
  flex-wrap: nowrap;
}

/* ============================================
   LOGO STYLES
   ============================================ */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.brand-logo:hover {
  transform: scale(1.02);
}

.logo-img {
  width: 55px;
  height: 55px;
  transition: transform 0.5s ease;
}

.brand-logo:hover .logo-img {
  transform: rotate(360deg);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #0077b6;
  margin: 0;
  line-height: 1.2;
  font-family: "Poppins", sans-serif;
}

.brand-tagline {
  font-size: 12px;
  color: #6c757d;
  margin: 0;
  font-weight: 400;
}

/* ============================================
   NAVIGATION MENU STYLES
   ============================================ */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 1;
  justify-content: center;
}

.nav-item {
  position: relative;
}

/* Create a hover bridge between nav item and dropdown */
.has-dropdown::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 16px;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
  line-height: 1.2;
  text-align: center;
  min-height: 44px;
}

.nav-link i.fa-angle-down {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.nav-item:hover .nav-link i.fa-angle-down,
.nav-item.active .nav-link i.fa-angle-down {
  transform: rotate(180deg);
}

.nav-link:hover,
.nav-link.active {
  color: #0077b6;
  background: rgba(0, 119, 182, 0.08);
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.1);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: #0077b6;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ============================================
   DROPDOWN MEGA MENU STYLES
   ============================================ */
.dropdown-mega {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 400px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 15px;
  padding: 10px;
  border-top: 3px solid #0077b6;
  pointer-events: none;
}

.has-dropdown:hover .dropdown-mega {
  opacity: 1;
  visibility: visible;
  margin-top: 5px;
  pointer-events: auto;
}

.dropdown-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dropdown-link {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px 20px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.dropdown-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #0077b6;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 2px 2px 0;
}

.dropdown-link:hover::before,
.dropdown-link.active::before {
  transform: scaleY(1);
}

.dropdown-link:hover,
.dropdown-link.active {
  background: linear-gradient(
    135deg,
    rgba(0, 119, 182, 0.08) 0%,
    rgba(0, 180, 216, 0.08) 100%
  );
  transform: translateX(5px);
}

.dropdown-link i {
  font-size: 24px;
  color: #0077b6;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.3s ease;
}

.dropdown-link:hover i {
  transform: scale(1.2);
  color: #00b4d8;
}

.link-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.link-content strong {
  color: #2c3e50;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.dropdown-link:hover .link-content strong {
  color: #0077b6;
}

.link-content span {
  color: #6c757d;
  font-size: 13px;
  line-height: 1.4;
}

/* ============================================
   CTA BUTTON STYLES
   ============================================ */
.cta-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 30px;
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.cta-button:hover {
  background: linear-gradient(135deg, #005f94 0%, #0096b8 100%);
  box-shadow: 0 6px 25px rgba(0, 119, 182, 0.4);
  transform: translateY(-2px);
  color: #ffffff;
}

.cta-button i {
  font-size: 16px;
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 1001;
  margin-left: auto;
}

.hamburger-line {
  width: 28px;
  height: 3px;
  background: #0077b6;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-toggle:hover .hamburger-line {
  background: #00b4d8;
}

/* ============================================
   MOBILE MENU STYLES
   ============================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  width: 320px;
  max-width: 90%;
  height: 100vh;
  background: #ffffff;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transition: transform 0.4s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateX(0);
}

body.menu-open {
  overflow: hidden;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
  color: #ffffff;
}

.mobile-menu-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.mobile-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.mobile-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-list > li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-list > li > a {
  display: block;
  padding: 15px 20px;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.mobile-nav-list > li > a:hover {
  background: rgba(0, 119, 182, 0.08);
  color: #0077b6;
  padding-left: 30px;
}

.mobile-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: #f8f9fa;
}

.has-submenu.open .mobile-submenu {
  max-height: 500px;
}

.submenu-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
}

.submenu-toggle i {
  transition: transform 0.3s ease;
}

.has-submenu.open .submenu-toggle i {
  transform: rotate(180deg);
}

.mobile-submenu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 40px;
  color: #495057;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.mobile-submenu li a i {
  color: #0077b6;
  width: 20px;
}

.mobile-submenu li a:hover {
  background: rgba(0, 119, 182, 0.12);
  color: #0077b6;
  padding-left: 50px;
}

.mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
  transition: all 0.3s ease;
}

.mobile-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 119, 182, 0.4);
  color: #ffffff;
}

/* ============================================
   WhatsApp Floating Action Button (FAB)
   ============================================ */
.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25d366 0%, #20b358 100%);
  color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25);
  z-index: 10001;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-fab:hover,
.whatsapp-fab:focus {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.33);
}

.whatsapp-fab i {
  font-size: 20px;
}

/* Accessibility: keyboard focus ring */
.whatsapp-fab:focus {
  outline: 3px solid rgba(0, 119, 182, 0.15);
  outline-offset: 3px;
}

/* Hide when mobile menu is open to avoid overlap */
body.menu-open .whatsapp-fab {
  display: none;
}

/* Tweak position for small screens so it doesn't overlap sticky footer/content */
@media (max-width: 576px) {
  .whatsapp-fab {
    right: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
  }
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1200px) {
  .nav-link {
    padding: 10px 12px;
    font-size: 14px;
  }

  .dropdown-mega {
    min-width: 350px;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 1024px) {
  .nav-link {
    padding: 8px 10px;
    font-size: 13px;
  }

  .cta-button {
    padding: 8px 16px;
    font-size: 13px;
  }

  .main-navigation {
    gap: 15px;
  }
}

@media (max-width: 1100px) {
  .nav-menu,
  .cta-button {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .professional-topbar {
    font-size: 13px;
    padding: 8px 0;
  }

  .topbar-content {
    justify-content: center;
  }

  .topbar-left,
  .topbar-right {
    gap: 15px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-tagline {
    font-size: 11px;
  }

  .logo-img {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 768px) {
  .topbar-left {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .topbar-right {
    gap: 10px;
  }

  .topbar-link span {
    display: none;
  }

  .topbar-link i {
    font-size: 18px;
  }

  .social-link {
    width: 28px;
    height: 28px;
  }

  .brand-info {
    display: none;
  }

  .logo-img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 576px) {
  .professional-topbar {
    padding: 6px 0;
  }

  .topbar-content {
    gap: 10px;
  }

  .topbar-text {
    display: none;
  }

  .main-navigation {
    padding: 10px 0;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
.nav-link:focus,
.dropdown-link:focus,
.cta-button:focus,
.mobile-toggle:focus,
.mobile-close:focus {
  outline: 2px solid #0077b6;
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  .professional-topbar,
  .professional-header,
  .whatsapp-fab {
    display: none;
  }
}

.top-bar a {
  color: var(--clr-white);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: opacity 0.3s ease;
}

.top-bar a:hover {
  opacity: 0.8;
}

.top-bar .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.25rem;
  transition: all 0.3s ease;
}

.top-bar .social-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Main Navigation Styles */
.navbar {
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-primary-dark) !important;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: rotate(360deg);
}

.brand-text strong {
  font-size: 1.1rem;
  color: var(--clr-primary-dark);
  display: block;
  line-height: 1.2;
}

.brand-text small {
  font-size: 0.75rem;
  color: var(--clr-muted);
}

/* Navigation Links */
.navbar-nav .nav-link {
  color: var(--clr-deep) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--clr-primary) !important;
  background: rgba(0, 119, 182, 0.1);
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--clr-primary);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
}

/* Dropdown Menus */
.dropdown-menu {
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-top: 0.5rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  color: var(--clr-deep);
}

.dropdown-item:hover {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  color: var(--clr-white);
  transform: translateX(5px);
}

.dropdown-item i {
  color: var(--clr-primary);
  transition: color 0.3s ease;
}

.dropdown-item:hover i {
  color: var(--clr-white);
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-color: rgba(0, 0, 0, 0.1);
}

/* CTA Button */
.btn-consultation {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
}

.btn-consultation:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 182, 0.4);
}

/* Mobile Styles */
@media (max-width: 991.98px) {
  .navbar-nav {
    padding: 1rem 0;
  }

  .navbar-nav .nav-link {
    margin: 0.25rem 0;
  }

  .navbar-nav .nav-link::after {
    display: none;
  }

  .dropdown-menu {
    border: none;
    box-shadow: none;
    background: rgba(0, 119, 182, 0.05);
    margin-top: 0;
    margin-left: 1rem;
  }

  .btn-consultation {
    width: 100%;
    text-align: center;
  }

  .top-bar .row > div {
    padding: 0.5rem 0;
  }
}

/* Navbar Toggler Animation */
.navbar-toggler {
  border: 2px solid var(--clr-primary);
  padding: 0.5rem 0.75rem;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background: var(--clr-primary);
}

.navbar-toggler:hover .navbar-toggler-icon {
  filter: brightness(0) invert(1);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 119, 182, 0.25);
}

/* Sticky Header Enhancement */
.sticky-top {
  transition: all 0.3s ease;
}

body.scrolled .sticky-top {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px);
}

/* Accessibility Improvements */
.nav-link:focus,
.dropdown-item:focus,
.btn-consultation:focus {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* Loading State */
#header-placeholder {
  min-height: 100px;
}

#header-placeholder.loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

#header-placeholder.loading::after {
  content: "Loading...";
  color: var(--clr-muted);
}
