/* Navbar container */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: center; /* center links */
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  position: relative;
  gap: 20px;
  flex-wrap: wrap;
  z-index: 1000; /* ensure nav is above content */
}

/* Logo */
.nav-logo a {
  font-family: "Playfair Display SC", serif;
  font-size: 2rem;
  color: #3e4350;
  text-decoration: none;
  transition: font-size 0.3s ease;
}

/* Mobile-only logo above nav links */
.nav-logo-mobile {
  display: none; /* default hidden */
  width: 100%;
  text-align: center;
  padding: 12px 0;
}

.nav-logo-mobile a {
  font-family: "Playfair Display SC", serif;
  font-size: 1rem;
  color: #3e4350;
  text-decoration: none;
  font-weight: 600;
}

/* Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-links li a {
  text-decoration: none;
  color: #3e4350;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-links li a:hover {
  color: #99b8fa;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #3e4350;
  cursor: pointer;
}

/* ------------------ MOBILE ------------------ */
@media (max-width: 780px) {

  /* Navbar container */
  .nav-container {
    display: flex;
    flex-wrap: nowrap;          /* prevent wrapping */
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 12px 20px;
  }

  /* Hamburger button */
  .nav-toggle {
    display: block;
    font-size: 1.6rem;
    color: #3e4350;
    background: none;
    border: none;
    cursor: pointer;
    order: 1;                   /* keep on top row */
    z-index: 1001;
  }

  /* Mobile logo */
  .nav-logo-mobile {
    display: block;
    position: absolute;
    top: 50%;                  /* center vertically */
    left: 50%;
    transform: translate(-50%, -50%);  /* center both horizontally & vertically */
    text-align: center;
    font-weight: 600;
    z-index: 1000;
  }

  .nav-logo-mobile a {
    font-family: "Playfair Display SC", serif;
    font-size: 1rem;
    color: #3e4350;
    text-decoration: none;
  }

  /* Sliding menu */
  .nav-links {
    position: absolute;
    top: 56px;                  /* below logo/toggle */
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(228,236,253,0.97), rgba(255,255,255,0.95));
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 12px 0;
    list-style: none;
    overflow: hidden;
    max-height: 0;              /* hidden initially */
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  /* Show menu on toggle */
  .nav-links.show {
    max-height: 500px;          /* enough for all links */
    opacity: 1;
  }

  /* Menu links */
  .nav-links li {
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: transform 0.4s ease, opacity 0.4s ease;
  }

  /* Animate each link with a small delay */
  .nav-links.show li:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0);}
  .nav-links.show li:nth-child(2) { transition-delay: 0.10s; opacity: 1; transform: translateY(0);}
  .nav-links.show li:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0);}
  .nav-links.show li:nth-child(4) { transition-delay: 0.20s; opacity: 1; transform: translateY(0);}
  .nav-links.show li:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0);}

  .nav-links li a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    color: #3e4350;
    text-decoration: none;
  }
}
