/* OrealMine Header Specific Styles */
/* Enhanced header styling and components */

/* Top Notification Bar */
.top-notification {
  background-color: #f39c12;
  color: #2c3e50;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 500;
}

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

.top-notification i {
  margin-right: 0.5rem;
}

.btn-small {
  background-color: rgba(0, 0, 0, 0.1);
  color: #2c3e50;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-small:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Top User Bar */
.top-user-bar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}

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

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

.top-user-links a {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.top-user-links a:hover {
  color: #e67e22;
}

.top-user-links a i {
  margin-right: 0.3rem;
  font-size: 0.8rem;
}

.user-welcome {
  color: #495057;
  font-weight: 500;
}

/* Main Header */
.main-header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

/* Logo/Branding - FIXED */
.header-branding {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 200px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  width: auto;
  height: 40px;
  max-height: 40px;
  max-width: 180px;
  transition: all 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a365d;
}

.logo-text span {
  color: #e67e22;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #1a365d;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
}

.mobile-menu-toggle:focus {
  outline: 2px solid #e67e22;
  outline-offset: 2px;
}

/* Main Navigation - FIXED */
.main-navigation {
  flex-grow: 1;
  margin: 0 2rem;
  max-width: 1200px;
  width: auto;
}

.nav-menu {
            display: flex;
            justify-content: center;
            flex-wrap: nowrap;
            list-style: none;
            margin: 0;
            padding: 0;
        }

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  color: #1a365d;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 0.75rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-menu > li > a i {
  margin-right: 0.4rem;
  font-size: 0.85em;
}

.nav-menu > li > a:hover,
.nav-menu > li > a:focus {
  background-color: rgba(0, 0, 0, 0.05);
  outline: none;
}

.nav-menu > li.active > a {
  color: #e67e22;
  background-color: rgba(230, 126, 34, 0.1);
}

/* Dropdown Menus */
.menu-item-has-children > a::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: 0.4rem;
  font-size: 0.65rem;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.menu-item-has-children:hover .sub-menu,
.menu-item-has-children:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li a {
  color: #1a365d;
  padding: 0.5rem 1.2rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.sub-menu li a i {
  margin-right: 0.6rem;
  width: 1rem;
  text-align: center;
}

.sub-menu li a:hover,
.sub-menu li a:focus {
  background-color: rgba(0, 0, 0, 0.05);
  color: #e67e22;
  outline: none;
}

/* Header Actions (Search, Trade, User) - FIXED */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Search Button */
.search-btn {
  color: #1a365d;
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.search-btn:hover,
.search-btn:focus {
  color: #e67e22;
  background-color: rgba(0, 0, 0, 0.05);
  outline: none;
}

.search-btn .search-text {
  display: none;
}

/* Trade Button */
.trade-btn {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  background-color: #e67e22;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.trade-btn:hover,
.trade-btn:focus {
  background-color: #d35400;
  outline: none;
}

.trade-btn i {
  margin-right: 0.4rem;
}

/* User Actions */
.user-actions {
  display: flex;
  align-items: center;
}

.auth-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: #e67e22;
  color: #fff;
  height: 39px;
  padding: 0px;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #d35400;
  outline: none;
}

.btn-outline {
  color: #1a365d;
  background: transparent;
  height: 24px;
  padding: 0px;
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: rgba(0, 0, 0, 0.05);
  outline: none;
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-profile {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #1a365d;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 4px;
}

.user-profile:hover,
.user-profile:focus {
  color: #e67e22;
  background-color: rgba(0, 0, 0, 0.05);
  outline: none;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.5rem;
  border: 2px solid #e2e8f0;
}

.user-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4a5568 0%, #1a365d 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  border: 2px solid #e2e8f0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.user-dropdown:hover .dropdown-menu,
.user-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  color: #1a365d;
  text-decoration: none;
  transition: all 0.3s ease;
}

.dropdown-menu a i {
  margin-right: 0.75rem;
  width: 1rem;
  text-align: center;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background-color: rgba(0, 0, 0, 0.05);
  color: #e67e22;
  outline: none;
}

.dropdown-divider {
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  margin: 0.5rem 0;
}

/* Notification Icon */
.notification-icon {
  position: relative;
  color: #1a365d;
  font-size: 1rem;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.notification-icon:hover,
.notification-icon:focus {
  color: #e67e22;
  background-color: rgba(0, 0, 0, 0.05);
  outline: none;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #e53e3e;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: bold;
}

/* Market Ticker */
.market-ticker {
  background-color: #1a365d;
  color: #fff;
  padding: 0.5rem 0;
  font-size: 0.85rem;
}

.market-ticker .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.ticker-container {
  display: flex;
  overflow: hidden;
  gap: 2rem;
  flex-grow: 1;
}

.ticker-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.ticker-name {
  margin-right: 0.25rem;
}

.ticker-price {
  font-weight: 600;
  margin-right: 0.5rem;
}

.ticker-change {
  display: flex;
  align-items: center;
}

.ticker-change.up {
  color: #38a169;
}

.ticker-change.down {
  color: #e53e3e;
}

.ticker-more {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.ticker-more:hover,
.ticker-more:focus {
  color: #e67e22;
  outline: none;
}

.ticker-more i {
  margin-left: 0.25rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .main-navigation {
    max-width: 600px;
  }
  
  .nav-menu > li > a {
    padding: 0.75rem 0.6rem;
    font-size: 0.85rem;
  }
  
  .header-branding {
    max-width: 180px;
  }
  
  .logo img {
    max-width: 160px;
  }
}

@media (max-width: 1024px) {
  .main-navigation {
    max-width: 500px;
    margin: 0 0.75rem;
  }

  .nav-menu > li > a {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .nav-menu > li > a i {
    margin-right: 0.3rem;
  }

  .ticker-container {
    gap: 1.5rem;
  }
  
  .header-branding {
    max-width: 160px;
  }
  
  .logo img {
    max-width: 140px;
  }
}

@media (max-width: 768px) {
  .main-header .container {
    flex-wrap: wrap;
    padding: 0.5rem;
  }

  .header-branding {
    width: auto;
    justify-content: flex-start;
    max-width: none;
  }

  .mobile-menu-toggle {
    display: block;
    order: 2;
  }

  .header-actions {
    order: 3;
    margin-left: auto;
  }

  .main-navigation {
    display: none;
    width: 100%;
    margin: 0;
    order: 4;
    padding-top: 0.5rem;
    max-width: none;
  }

  .main-navigation.active {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
  }

  .nav-menu > li {
    margin: 0;
  }

  .nav-menu > li > a {
    padding: 0.75rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
  }

  .sub-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0;
    display: none;
    background-color: #f7fafc;
  }

  .menu-item-has-children:hover .sub-menu,
  .menu-item-has-children.active .sub-menu,
  .menu-item-has-children:focus-within .sub-menu {
    display: block;
  }

  .market-ticker {
    display: none;
  }

  .trade-btn span {
    display: none;
  }

  .trade-btn i {
    margin-right: 0;
  }

  .top-user-bar {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-buttons .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .logo img {
    height: 35px;
    max-height: 35px;
    max-width: 120px;
  }

  .user-profile span.user-name {
    display: none;
  }

  .user-dropdown .fa-chevron-down {
    display: none;
  }

  .search-btn span {
    display: none;
  }
}
