header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffe226;
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 226, 38, 0.15); 
  box-sizing: border-box;
}

header img {
  width: 65px;
  height: auto;
  transition: transform 0.3s ease;
}

header img:hover {
  transform: scale(1.05);
}

header .links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #000; 
}

header .links .link {
  text-decoration: none;
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    color 0.3s ease,
    transform 0.2s ease;
  position: relative;
  padding: 5px 0;
}

header .links .link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #000;
  transition: width 0.3s ease;
}

header .links .link:hover {
  text-decoration: none;
  color: #111;
}

header .links .link:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

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

@media screen and (max-width: 768px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    z-index: 1000;
  }

  .menu-toggle {
    display: flex;
  }

  header .links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffe226;
    backdrop-filter: blur(20px);
    padding: 50px 0;
    gap: 30px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 226, 38, 0.2);
    transition: right 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);

    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.1, 0.9, 0.2, 1), visibility 0.4s;
  }

  header .links .link {
    color: #000;
    font-size: 1.4rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
  }

  header .links .link:hover {
    color: #111;
  }

  header .links.active {
    transform: translateX(0);
    visibility: visible;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
