/* ==========================================================================
   Modern Professional Navbar
   KMS Technologies - Navbar Styles
   ========================================================================== */

/* Site Header Container */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1050;
}

/* Header Top Bar */
.header-top {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  border-bottom: none;
  padding: 0.5rem 0;
  height: 40px;
  will-change: transform, opacity;
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header.top-hidden .header-top {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header-top-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Contact Info */
.header-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.header-contact-item:hover {
  color: #ffc107;
  background: rgba(255, 193, 7, 0.1);
}

.header-contact-item svg {
  color: #ffc107;
  flex-shrink: 0;
}

.header-contact-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 0.5rem;
}

/* Social Links in Top Bar */
.header-social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-social-link {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  transition: all 0.25s ease;
}

.header-social-link:hover {
  color: #ffc107;
  background: rgba(255, 193, 7, 0.15);
  transform: translateY(-2px);
}

/* Header Right (Social + CTA wrapper) */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Top Bar CTA Button */
.topbar-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 1rem;
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #1a1a2e;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
  white-space: nowrap;
}

.topbar-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.45);
  background: linear-gradient(135deg, #ffca28, #ffa726);
}

/* Main Navigation */
.main-nav {
  background: #ffffff;
  padding: 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  will-change: transform;
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Navbar slides up when top bar hides - matches top bar height exactly */
.site-header.top-hidden .main-nav {
  transform: translateY(-40px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  transition: height 0.3s ease;
}

/* Slightly smaller navbar when scrolled for cleaner look */
.site-header.top-hidden .nav-container {
  height: 65px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
  width: 230px;
  height: auto;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #1a1a2e;
  background: rgba(255, 193, 7, 0.1);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffc107, #ff9800);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: calc(100% - 1.5rem);
}

/* Dropdown Arrow */
.dropdown-arrow {
  transition: transform 0.25s ease;
  color: #9ca3af;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
  color: #ffc107;
}

/* Dropdown Menu */
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  list-style: none;
  margin: 0;
  z-index: 1060;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 0.65rem 1rem;
  color: #4b5563;
  font-size: 0.8rem;
  font-weight: 400;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-dropdown-item:hover {
  color: #1a1a2e;
  background: linear-gradient(90deg,
      rgba(255, 193, 7, 0.15),
      rgba(255, 193, 7, 0.05));
  padding-left: 1.25rem;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #1a1a2e;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.25);
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.35);
}

.nav-iso-badge {
  display: flex;
  align-items: center;
}

.nav-iso-badge img {
  height: 50px;
  width: auto;
}

/* Mobile Toggle Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  gap: 5px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 193, 7, 0.1);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1a2e;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Header Spacer */
.header-spacer {
  height: 110px;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1055;
  backdrop-filter: blur(4px);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Navigation Panel */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #ffffff;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1a1a2e;
  font-weight: 600;
  font-size: 1rem;
}

.mobile-nav-logo .nav-logo-icon {
  width: 36px;
  height: 36px;
}

.mobile-nav-logo .nav-logo-icon span {
  font-size: 0.75rem;
}

.mobile-nav-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-close:hover {
  background: #e5e7eb;
  color: #1a1a2e;
}

.mobile-nav-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.875rem 1.25rem;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  background: rgba(255, 193, 7, 0.1);
  color: #1a1a2e;
}

.mobile-dropdown-toggle .dropdown-arrow {
  transition: transform 0.3s ease;
}

.mobile-nav-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.mobile-dropdown-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f9fafb;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-nav-dropdown.active .mobile-dropdown-menu {
  max-height: 500px;
}

.mobile-dropdown-menu a {
  display: block;
  padding: 0.75rem 1.25rem 0.75rem 2.5rem;
  color: #4b5563;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.mobile-dropdown-menu a:hover {
  background: rgba(255, 193, 7, 0.1);
  color: #1a1a2e;
  border-left-color: #ffc107;
}

.mobile-nav-cta {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.mobile-cta-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #1a1a2e;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.mobile-cta-btn:hover {
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.35);
}

.mobile-phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.875rem;
  background: #f3f4f6;
  color: #1a1a2e;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-phone-btn:hover {
  background: #e5e7eb;
}

.mobile-nav-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.mobile-nav-social {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.mobile-nav-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #6b7280;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
}

.mobile-nav-social a:hover {
  color: #ffc107;
  border-color: rgba(255, 193, 7, 0.3);
  background: rgba(255, 193, 7, 0.1);
}

/* Mobile Contact Icons (in navbar for mobile devices) */
.mobile-contact-icons {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-contact-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  background: #f3f4f6;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-contact-icon:hover {
  color: #ffc107;
  background: rgba(255, 193, 7, 0.15);
}

.mobile-contact-icon svg {
  flex-shrink: 0;
}

/* ==========================================================================
   Navbar Responsive Styles
   ========================================================================== */
@media (max-width: 1200px) {
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .nav-cta-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .nav-iso-badge img {
    height: 45px;
  }
}

@media (max-width: 991.98px) {

  .nav-menu,
  .nav-actions {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header-spacer {
    height: 104px;
  }

  .nav-container {
    height: 64px;
  }
}

@media (max-width: 767.98px) {

  /* Hide top bar completely on mobile (below tablet) */
  .header-top {
    display: none !important;
  }

  /* Hide topbar CTA on mobile (mobile menu has its own) */
  .topbar-cta-btn {
    display: none !important;
  }

  /* Disable top bar animation on mobile since it's hidden */
  .site-header.top-hidden .main-nav {
    transform: translateY(0);
  }

  /* Show mobile contact icons */
  .mobile-contact-icons {
    display: flex;
  }

  .header-spacer {
    height: 60px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
    height: 60px;
  }

  .nav-logo-icon {
    width: 38px;
    height: 38px;
  }

  .nav-logo-icon span {
    font-size: 0.8rem;
  }

  .nav-logo-name {
    font-size: 1.05rem;
  }

  .nav-logo-tagline {
    font-size: 0.65rem;
  }
}

@media (max-width: 576px) {
  .nav-container {
    height: 56px;
  }

  .nav-logo-icon {
    width: 34px;
    height: 34px;
  }

  .nav-logo-name {
    font-size: 0.95rem;
  }

  .nav-logo-tagline {
    font-size: 0.6rem;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
    padding: 8px;
  }

  .nav-toggle-bar {
    width: 20px;
  }

  .mobile-nav {
    width: 280px;
  }

  .header-spacer {
    height: 56px;
  }

  .mobile-contact-icon {
    width: 36px;
    height: 36px;
  }

  .mobile-contact-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 420px) {
  .nav-logo-tagline {
    display: none;
  }

  .mobile-nav {
    width: 260px;
  }

  .header-spacer {
    height: 56px;
  }

  .mobile-contact-icon {
    width: 34px;
    height: 34px;
    gap: 6px;
  }

  .mobile-contact-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* ==========================================================================
   Top Bar Social Media Icons
   ========================================================================== */
.topbar-social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

.topbar-social-icon:active {
  transform: translateY(-1px) scale(1.05);
}