:root {
  --iiser-red: #A51C30;
  --dark-text: #222;
  --light-border: #e6e6e6;
  --nav-bg: #ffffff;
}

/* NAVBAR */
.main-nav {
  width: 100%;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--light-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1300px;
  margin: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */
.logo {
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--dark-text);
}

.logo-accent {
  color: var(--iiser-red);
}

/* MENU */
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--dark-text);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

/* Hover underline */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: var(--iiser-red);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--iiser-red);
}

/* DROPDOWN */
.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--light-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 10;
}

.dropdown-content a {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--dark-text);
  font-size: 0.9rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.dropdown-content a:hover {
  background: var(--iiser-red);
  color: #ffffff;
}

/* Desktop hover */
.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* MOBILE MENU TOGGLE */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle .bar {
  height: 3px;
  width: 25px;
  background: var(--dark-text);
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* MOBILE STYLES */
@media (max-width: 1024px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 10px;
    display: none;
    border-bottom: 1px solid var(--light-border);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
  }

  /* Disable hover dropdown on mobile */
  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
  }

  .dropdown.open .dropdown-content {
    display: block;
  }
}
