/* --------top header---------- */
.header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 999;
  backdrop-filter: blur(10px);
}

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

.logo {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo span {
  background: linear-gradient(135deg, #e63946, #f87171);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.menu li { position: relative; }

.menu a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu a:hover { color: #e63946; transform: translateY(-1px); }

.dropdown {
  position: absolute;
  background: rgba(30,41,59,0.95);
  backdrop-filter: blur(20px);
  list-style: none;
  min-width: 240px;
  padding: 1rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  top: 100%;
  left: 0;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 0.875rem 1.5rem;
  color: #cbd5e1;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 0 0.5rem;
}

.dropdown li a:hover { 
  background: rgba(230,57,70,0.2);
  color: #e63946;
  transform: translateX(4px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.375rem;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
  .logo { font-size: 1.4rem; }
  .menu-toggle { display: flex; }

  .nav {
    position: fixed;
    right: -100%;
    top: 64px;
    width: 320px;
    height: calc(100vh - 64px);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    border-left: 1px solid rgba(255,255,255,0.1);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav::-webkit-scrollbar {
    width: 4px;
  }
  .nav::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
  }
  .nav::-webkit-scrollbar-thumb {
    background: rgba(230,57,70,0.5);
    border-radius: 2px;
  }

  .nav.active { right: 0; }

  .menu {
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0 0 0;
  }

  .menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1.25rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    margin-bottom: 0.25rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .menu > li > a:hover,
  .menu > li > a.active {
    background: rgba(230,57,70,0.15);
    border-color: rgba(230,57,70,0.3);
    color: #e63946 !important;
    transform: translateX(4px);
  }

  .dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    background: rgba(30,41,59,0.9);
    margin: 0.25rem 0 0 1rem;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    list-style: none;
  }

  .has-dropdown.open > .dropdown {
    max-height: 500px !important;
    padding: 1rem !important;
  }

  .dropdown li {
    margin: 0.25rem 0;
  }

  .dropdown li a {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.875rem 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
  }

  .dropdown li a:hover {
    background: rgba(230,57,70,0.2);
    border-left-color: #e63946;
    color: #f1f5f9;
    transform: translateX(4px);
  }

  .has-dropdown > a::after {
    content: "▾";
    font-size: 1rem;
    font-weight: 300;
    transition: all 0.3s ease;
  }

  .has-dropdown.open > a::after {
    transform: rotate(180deg);
    color: #e63946;
  }
}