/**
 * EPremier League - Clean Dropdown Navigation
 * 
 * Error-free header with emoji icons and smooth dropdown functionality
 * 
 * @version: 4.4.0 - Fixed Dropdown Functionality & Styling
 */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Base reset and typography */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  padding: 0;
}

/* Base Header Styles */
.header-modern {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  height: 70px !important;
  background: white !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: all 0.3s ease !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.header-modern.scrolled {
  background: white !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  height: 70px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

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

/* Logo Styles */
.header-logo {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

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

.logo-image {
  height: 32px;
  width: auto;
  margin-right: 0.75rem;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
  transition: filter 0.3s ease;
}

.logo-link:hover .logo-image {
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.6));
}

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: #1e293b;
  background: linear-gradient(90deg, #1e293b, #64748b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Styles */
.header-nav {
  height: 100%;
}

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

.nav-item {
  height: 100%;
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1rem;
  color: #64748b;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  position: relative;
}

.nav-link:hover,
.nav-item.active .nav-link {
  color: #1e293b;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.nav-icon {
  font-size: 1.1rem;
  margin-right: 0.5rem;
  transition: transform 0.2s ease;
}

.nav-link:hover .nav-icon,
.nav-item.active .nav-icon {
  transform: scale(1.1);
}

/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  position: relative;
}

.dropdown-arrow {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  opacity: 0.8;
  display: inline-block;
}

.dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: white !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.2s ease !important;
  z-index: 9999 !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 8px 0 !important;
  pointer-events: none;
  white-space: nowrap;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
}

.dropdown-link {
  display: block !important;
  padding: 10px 16px !important;
  color: #374151 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  font-family: 'Inter', sans-serif !important;
  transition: background-color 0.15s ease !important;
  border-radius: 4px !important;
  margin: 2px 6px !important;
  position: relative !important;
  background: transparent !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
}

.dropdown-link:hover {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

.dropdown-link:active {
  transform: translateX(2px) scale(0.98);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 28px;
  position: relative;
  outline: none;
  z-index: 20;
}

.toggle-line {
  display: block;
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #fff, #cbd5e1);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.toggle-line:nth-child(1) {
  top: 0;
}

.toggle-line:nth-child(2) {
  top: calc(50% - 1.5px);
}

.toggle-line:nth-child(3) {
  bottom: 0;
}

.mobile-toggle.open .toggle-line:nth-child(1) {
  transform: translateY(12px) rotate(45deg);
}

.mobile-toggle.open .toggle-line:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open .toggle-line:nth-child(3) {
  transform: translateY(-12px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 0;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  overflow: hidden;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
}

.mobile-menu.open {
  height: calc(100vh - 60px);
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  padding: 2rem 1.5rem;
  transform: translateY(-30px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  transition-delay: 0.1s;
}

.mobile-menu.open .mobile-menu-content {
  transform: translateY(0);
  opacity: 1;
}

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

.mobile-nav-item {
  margin-bottom: 1rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-nav-item.active .mobile-nav-link,
.mobile-nav-link:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

.mobile-nav-icon {
  font-size: 1.25rem;
  margin-right: 1rem;
  transition: transform 0.2s ease;
}

.mobile-nav-link:hover .mobile-nav-icon {
  transform: scale(1.1);
}

/* Page layout adjustment */
.page-main {
  padding-top: 80px;
}

.hero-section-compact {
  margin-top: -80px;
  padding-top: 70px;
}

/* Skip link for accessibility */
.skip-to-content {
  position: absolute;
  top: -999px;
  left: 0;
  background: #0060FF;
  color: white;
  padding: 0.5rem 1rem;
  z-index: 1100;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* Prevent page scrolling when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .logo-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .logo-text {
    display: none;
  }
  
  .header-modern {
    height: 50px;
  }
  
  .header-modern.scrolled {
    height: 45px;
  }
  
  .mobile-menu {
    top: 50px;
  }
  
  .mobile-menu.open {
    height: calc(100vh - 50px);
  }
  
  .page-main {
    padding-top: 60px;
  }
  
  .hero-section-compact {
    margin-top: -60px; 
    padding-top: 50px;
  }
}

/* Enhanced hover effects for desktop */
@media (min-width: 1024px) {
  .nav-item {
    transition: transform 0.2s ease;
  }
  
  .nav-item:hover {
    transform: translateY(-2px);
  }
  
  .nav-item.active:hover {
    transform: translateY(-1px);
  }
  
  .dropdown-menu {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }
}