/* --- Navbar Wrapper --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* --- Container --- */
.container-navbar-menu {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Logo --- */
.brand {
  flex-shrink: 0;
}
.brand img {
  width: 340px; /* slightly smaller for balance */
  height: auto;
  transition: all 0.3s ease;
}

/* --- Menu (Desktop) --- */
.menu {
  display: flex;
  align-items: center;
  gap: 30px;
  transition: all 0.3s ease;
}

.menu a {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #00796B;
}

/* --- Buttons --- */
.applybutton {
  background: #E4245C;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
}
.applybutton:hover {
  background: #c71c4f;
  transform: translateY(-2px);
}

.login-btn {
  background: #007bff;
}
.login-btn:hover {
  background: #0056b3;
}

/* --- Burger Icon --- */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2001;
  position: relative;
}

.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* --- Burger Open Animation --- */
.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* --- Overlay for Mobile --- */
#menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}
#menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Tablet Layout (iPad) --- */
/* Tablet + Large iPad */
@media (max-width: 1200px) and (min-width: 769px) {
  .container-navbar-menu {
    max-width: 95%;
    padding: 10px 25px;
    gap: 15px;
  }

  .brand img {
    width: 200px; /* adjust so menu fits */
  }

  .menu {
    gap: 20px;
  }

  .menu a {
    font-size: 15px;
  }

  .applybutton {
    padding: 6px 12px;
    font-size: 14px;
  }

  .burger {
    display: flex;
    position: absolute;
    right: 20px;
  }

  .menu {
    display: none; /* hide desktop menu, show on burger click */
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 25px 0;
    top: 120px;
    left: 0;
    right: 0;
    position: fixed;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(6px);
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .menu.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInMenu 0.3s ease forwards;
  }
}


/* --- Mobile Layout (≤768px) --- */
@media (max-width: 768px) {
  .burger {
    display: flex;
    position: absolute;
    right: 20px;
  }

  .brand img {
    width: 180px;
  }

  .menu {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 25px 0;
    border-top: 1px solid #eee;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(6px);
    z-index: 1001;
  }

  .menu.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInMenu 0.3s ease forwards;
  }

  .menu a {
    font-size: 17px;
    color: #333;
  }

  .applybutton {
    width: 80%;
    text-align: center;
  }
}

/* --- Animation --- */
@keyframes fadeInMenu {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
