/* Dropdown styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    height: 60px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease; /* Added for scroll effect */
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}



.logo-top img {
    height: 35px;
    width: auto;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.main-nav a:hover {
    color: #f0c420;
}

.dropdown {
    position: relative;
}


.dropdown-menu {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scaleY(0.98);
    transition: opacity 0.28s cubic-bezier(0.4,0,0.2,1), transform 0.28s cubic-bezier(0.4,0,0.2,1);
    display: block !important;
    position: absolute;
    left: 0;
    top: 100%;
    padding-top: 10px; 
    min-width: 120px;
    z-index: 100;
    list-style: none;
    background: rgba(40, 40, 50, 0.8); 
    backdrop-filter: blur(5px);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    overflow: hidden;
}


/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    padding: 0;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -6px);
}

@media (min-width: 1025px) {
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scaleY(1);
  }
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .main-nav.active {
    max-height: 550px;
  }
  
  .nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px 0;
    gap: 0;
  }
  
  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .dropdown .dropdown-toggle::after {
    content: ' ▼';
    font-size: 10px;
    margin-left: 8px;
    transition: transform 0.3s ease;
  }
  
  .dropdown.is-open .dropdown-toggle::after {
    transform: rotate(180deg);
  }
  
  .dropdown .dropdown-menu {
    position: static;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transform: none;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: none;
    border-radius: 0;
    min-width: auto;
    padding-top: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }
  
  .dropdown.is-open .dropdown-menu {
    max-height: 200px;
    opacity: 1;
    pointer-events: auto;
    display: block;
  }
  
  .dropdown-menu a {
    padding: 12px 40px;
    margin: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.05);
  }
}

.dropdown-menu li {
    padding: 0; /* Reset list item padding */
}


.dropdown-menu a {
    display: block;
    padding: 14px 24px;
    color: #fff; /* White text for dark background */
    background: transparent; /* No background color needed now */
    border-radius: 6px;
    margin: 4px 8px;
    transition: background 0.25s cubic-bezier(0.4,0,0.2,1), color 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s cubic-bezier(0.4,0,0.2,1);
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.18); /* More visible hover effect */
    color: #f0c420; /* Match main nav hover color */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px) scale(1.03);
}


/* --- Responsive Design --- */

@media (max-width: 768px) {
      .main-header {
        padding: 8px 15px;
        height: 50px;
    }
    
    .logo-top img {
        height: 28px;
    }
  
    .main-nav ul {
        gap: 15px;
    }
    .main-nav a {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 5px 10px;
        height: 45px;
    }
    
    .logo-top img {
        height: 25px;
    }
    .main-nav ul {
        gap: 10px;
    }
    .main-nav a {
        font-size: 17px;
    }
}


/* Responsive Design */


.language-dropdown .dropdown-menu {
  left: auto;
  right: -25px;   
}

@media (max-width: 1024px) and (max-height: 600px) {
  .main-header {
    height: 48px;
    padding: 6px 12px;
  }
  .logo-top img {
    height: 24px;
  }

  .main-nav.active {
    max-height: 50vh; /* limit to half the screen height */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  @supports (height: 100dvh) {
    .main-nav.active {
      max-height: 50dvh; /* dynamic viewport unit for mobile browsers */
    }
  }

  /* Compact menu spacing and typography */
  .nav-menu {
    padding: 12px 0;
  }
  .nav-menu > li > a,
  .dropdown-menu a {
    padding: 12px 16px;
  }
  .dropdown-menu a {
    padding-left: 28px; /* slight indent for submenu items */
  }

  /* Reduce font sizes for constrained height */
  .main-nav a {
    font-size: 13px;
  }
}
