/* Banner and Header Size Fixes */

/* Fix the fixed brand bar size */
.fixed-brand-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.05);
  z-index: 999;
  padding: 0.5rem 0; /* Reduced padding */
  overflow: hidden;
  height: 60px; /* Fixed height to match previous version */
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
}

.brand-logos-container {
  position: relative;
  overflow-x: auto; /* Allow horizontal scrolling */
  scrollbar-width: none; /* Hide scrollbar in Firefox */
  -ms-overflow-style: none; /* Hide scrollbar in IE and Edge */
  padding: 0.25rem 0; /* Reduced padding */
  width: 100%;
  cursor: grab; /* Indicates draggable */
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
}

.brand-logos-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar in Chrome, Safari */
}

.brand-logos-container.active {
  cursor: grabbing; /* Changes cursor when actively dragging */
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 4rem;
  animation: scrollLogos 30s linear infinite;
  width: max-content;
  padding-left: 4rem;
  height: 50px; /* Fixed height */
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
}

@keyframes scrollLogos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.brand-logos.paused {
  animation-play-state: paused;
}

.brand-logos * {
  user-select: none !important; /* Ensure no text selection on any child */
  -webkit-user-select: none !important; /* Safari */
  -moz-user-select: none !important; /* Firefox */
  -ms-user-select: none !important; /* IE10+/Edge */
  pointer-events: none; /* Only allow drag, no clicks */
}

.brand-logo {
  height: 40px; /* Reduced height */
  width: auto;
  max-width: 120px;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: grayscale(100%);
  object-fit: contain;
  pointer-events: none; /* Prevent individual logo interactions */
}

.brand-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* Header size fixes */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: all 0.3s ease;
  height: 70px; /* Fixed height */
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 0.6rem 1rem; /* Reduced padding */
  max-width: 1400px; /* Increased max-width */
  height: 100%;
}

.logo {
  font-size: 1.4rem; /* Reduced size */
  font-weight: 700;
  white-space: nowrap;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1rem; /* Further reduced gap */
  flex-wrap: nowrap;
  overflow: visible; /* For dropdowns */
}

.nav-item {
  position: relative;
  white-space: nowrap;
}

.nav-link {
  color: var(--black);
  font-weight: 500;
  padding: 0.4rem 0; /* Reduced padding */
  position: relative;
  transition: color 0.3s ease;
  font-size: 0.9rem; /* Reduced font size more */
}

/* Dropdown menu styling */
.nav-more-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  color: var(--black);
  font-weight: 600;
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-more-button:after {
  content: "▼";
  font-size: 0.7rem;
  display: inline-block;
  margin-left: 0.25rem;
}

.nav-more-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(145deg, #f8f5ff 0%, #f0ebfa 100%);
  border: 1px solid rgba(138, 112, 214, 0.4);
  box-shadow: 0 6px 16px rgba(138, 112, 214, 0.15), 0 2px 4px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  padding: 0.5rem 0;
  min-width: 220px;
  z-index: 1001;
  overflow: hidden;
}

.nav-more-dropdown.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--dark-purple);
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: linear-gradient(to right, rgba(138, 112, 214, 0.1) 0%, rgba(138, 112, 214, 0.05) 100%);
  color: var(--primary-purple);
  font-weight: 600;
  border-left: 3px solid var(--primary-purple);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Only show dropdown when menu is too long to fit */
.show-dropdown .nav-list {
  display: flex;
}

.show-dropdown .nav-more-dropdown {
  display: none;
}

/* Only show the dropdown menu when screen size requires it */
@media (max-width: 1300px) {
  .show-dropdown .nav-item:nth-last-child(-n+3) {
    display: none;
  }
  
  .show-dropdown .nav-more {
    display: block;
  }
}

/* Mobile Optimizations */
@media (max-width: 992px) {
  .header-inner {
    padding: 0.5rem 1.5rem;
  }
  
  .logo {
    font-size: 1.4rem;
  }
  
  /* Hide desktop nav elements as defined in mobile-fixes.css */
  .nav-list, .header .btn-primary {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .fixed-brand-bar {
    height: 50px;
  }
  
  .brand-logo {
    height: 35px;
  }
  
  /* Ensure mobile menu is properly displayed */
  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 1001;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  /* iOS specific styles */
  .header {
    -webkit-backdrop-filter: blur(10px);
  }
  
  .fixed-brand-bar {
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Fix for iOS nav z-index issues */
  .mobile-nav {
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
  }
  
  .mobile-nav.active {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
}
