/* Custom Header CSS - Save as /assets/css/custom-header.css in your child theme */

/* === GENERAL HEADER STRUCTURE === */
.games-header {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  width: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.games-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* === TOP BAR === */
.games-header .top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 16px 24px;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.games-header .logo img,
.games-header .logo .custom-logo {
  height: 60px;
  display: block;
  max-width: 100%;
  transition: all 0.3s ease;
  filter: brightness(1.1);
}

.games-header .logo:hover img,
.games-header .logo:hover .custom-logo {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.games-header .search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  max-width: 600px;
  width: 100%;
  position: relative;
  height: 48px;
  margin: 0 auto;
}

.games-header .search input[type="search"] {
  width: 100%;
  padding: 12px 60px 12px 20px;
  border-radius: 24px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-size: 14px;
  height: 100%;
  outline: none;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.games-header .search input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.games-header .search input[type="search"]:focus {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(168, 85, 247, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.games-header .search button {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 36px;
  width: 48px;
  border: none;
  background: linear-gradient(135deg, #ea4aaa 0%, #f99f47 100%);
  color: white;
  border-radius: 18px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(234, 74, 170, 0.3);
}

.games-header .search button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(234, 74, 170, 0.4);
}

.games-header .top-icons {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 20px;
  position: relative;
  z-index: 1;
}

.games-header .top-icons a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.games-header .top-icons a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* === MOBILE MENU TOGGLE === */
.games-header .mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.games-header .mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.games-header .mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.games-header .mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(6px);
}

.games-header .mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.games-header .mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-6px);
}

/* === MAIN NAVIGATION === */
.games-header .main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 24px;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  z-index: 1;
}

.games-header .main-nav.hide-nav {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  position: absolute;
  width: 100%;
  padding: 0;
  height: 0;
  overflow: hidden;
}

.games-header .main-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  font-size: 14px;
}

.games-header .main-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-2px);
}

.games-header .main-nav .GCMongolia {
  background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.games-header .main-nav .GCMongolia:hover {
  background: linear-gradient(135deg, #a855f7 0%, #f472b6 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.4);
}

.games-header .dropdown {
  position: relative;
}

.games-header .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  border-radius: 16px;
  min-width: 200px;
  z-index: 999;
  animation: dropdownFadeIn 0.3s ease-out;
}

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

.games-header .dropdown:hover .dropdown-menu {
  display: block;
}

.games-header .dropdown-menu li {
  padding: 0;
}

.games-header .dropdown-menu li a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  display: block;
  padding: 12px 20px;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 2px 8px;
  font-size: 13px;
}

.games-header .dropdown-menu li a:hover {
  color: #ffffff;
  background: rgba(147, 51, 234, 0.2);
  transform: translateX(4px);
}

/* === TABLET HORIZONTAL SCROLL === */
@media (min-width: 769px) and (max-width: 1200px) {
  .games-header .main-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 16px 0;
    gap: 16px;
  }

  .games-header .main-nav::-webkit-scrollbar {
    display: none;
  }

  .games-header .main-nav {
    cursor: grab;
    padding: 16px 24px;
  }

  .games-header .main-nav:active {
    cursor: grabbing;
  }

  .games-header .main-nav a {
    cursor: pointer;
  }

  .games-header .main-nav > * {
    flex-shrink: 0;
  }

  .games-header .main-nav {
    position: relative;
  }

  .games-header .main-nav::before {
    content: '‹';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to left, transparent, rgba(15, 23, 42, 0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
  }

  .games-header .main-nav.can-scroll-left::before {
    opacity: 1;
  }

  .games-header .main-nav::after {
    content: '›';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, rgba(15, 23, 42, 0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
  }

  .games-header .main-nav.can-scroll-right::after {
    opacity: 1;
  }

  .games-header .dropdown-menu {
    position: fixed;
    top: auto;
    margin-top: 8px;
  }
}

/* === MOBILE STYLES === */
@media (max-width: 768px) {
  .games-header .main-nav {
    cursor: auto !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scrollbar-width: auto !important;
    -ms-overflow-style: auto !important;
  }

  .games-header .main-nav::-webkit-scrollbar {
    display: block !important;
  }

  .games-header .main-nav::before,
  .games-header .main-nav::after {
    display: none !important;
  }

  .games-header .top-bar {
    padding: 12px 16px;
    gap: 12px;
  }

  .games-header .logo img,
  .games-header .logo .custom-logo {
    height: 36px;
  }

  .games-header .search {
    max-width: none;
    height: 44px;
  }

  .games-header .search input[type="search"] {
    padding: 10px 50px 10px 16px;
    font-size: 14px;
  }

  .games-header .search button {
    width: 40px;
    height: 32px;
    top: 6px;
    right: 6px;
  }

  .games-header .top-icons {
    gap: 8px;
  }

  .games-header .top-icons a {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .games-header .mobile-menu-toggle {
    display: flex;
    order: -1;
    flex-shrink: 0;
  }

  .games-header .logo {
    flex-shrink: 0;
  }

  .games-header .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    gap: 0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .games-header .main-nav.mobile-open {
    display: flex;
    animation: mobileMenuSlide 0.3s ease-out;
  }

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

  .games-header .main-nav > a,
  .games-header .main-nav > .dropdown {
    width: 100%;
    margin: 0;
  }

  .games-header .main-nav > a {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 4px 0;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    display: block;
  }

  .games-header .main-nav .dropdown > a {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 4px 0;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    display: block;
    width: 100%;
  }

  .games-header .main-nav .GCMongolia {
    margin-bottom: 16px;
    text-align: center;
    display: block;
    width: 100%;
  }

  .games-header .dropdown-menu {
    position: static;
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 8px 0 16px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .games-header .dropdown.mobile-open .dropdown-menu {
    display: block;
    animation: mobileDropdownSlide 0.3s ease-out;
  }

  @keyframes mobileDropdownSlide {
    from {
      opacity: 0;
      max-height: 0;
    }
    to {
      opacity: 1;
      max-height: 300px;
    }
  }

  .games-header .dropdown-menu li a {
    padding: 12px 24px;
    margin: 2px 4px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .games-header .top-bar {
    padding: 10px 12px;
  }

  .games-header .search {
    height: 40px;
  }

  .games-header .search input[type="search"] {
    padding: 8px 44px 8px 14px;
    font-size: 13px;
  }

  .games-header .search button {
    width: 36px;
    height: 28px;
    font-size: 14px;
  }

  .games-header .top-icons a {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .games-header .mobile-menu-toggle {
    width: 36px;
    height: 36px;
  }

  .games-header .main-nav {
    padding: 16px;
  }

  .games-header .main-nav a {
    padding: 14px 16px;
    font-size: 14px;
  }
}

/* === BODY STYLING === */
body {
  padding-top: 120px !important; /* Space for fixed header */
}