html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main { /* Or whatever your content wrapper is; this makes it grow */
  flex: 1;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 1000;
  font-size: 1.5rem;
  font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif;
  letter-spacing: 3px;

}

.logo img {
  width: 100px;
}

/* ===================== Navigation Styles ===================== */

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif;
  font-weight: bold;
  letter-spacing: 3px;

  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: #5d4b4b;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #e3a23c;
}

.nav-links li {
  position: relative;
}

/* Donate Button */
.donate-btn {
  background: #9b59b6;
  color: white;
  padding: 10px 18px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  font-size: 1.5rem;
  font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif;
  letter-spacing: 3px;

}

.donate-btn:hover {
  background: #7d3c98;
}

/* ====== Dropdown Menu ====== */

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.95);
  list-style: none;
  padding: 10px 0;
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  min-width: 270px;
  z-index: 100;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  transition: background 0.3s ease;
  font-weight: 500;
}

.dropdown-menu a:hover {
  /*background: #ede4f9;
  color: #9b59b6;*/
  color: #e3a23c;
}

/* Show menu on hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* ====== HAMBURGER MENU ====== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #333;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Animate hamburger when active */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}


/* Mobile-specific donate link is hidden by default (desktop) */
.mobile-donate { display: none; }

/* Footer */
footer {
  background: #9b59b6;
  color: #faf5f2;
  text-align: center;
  padding: 25px 0;
  margin-top: auto;
}

footer a {
  color: #faf5f2;
  margin: 0 10px;
  text-decoration: none;
}

/*footer a:hover {
  text-decoration: underline;
}*/

footer img {
  padding-top: 10px;
  width: 24px;
  margin: 0 8px;
  vertical-align: middle;
}

footer p {
  font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif;
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 3px;
}

/* ====== MOBILE NAV STYLING ====== */


@media (max-width: 900px) {
nav {
    position: fixed; /* keep nav visible while scrolling */
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(6px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    z-index: 999;
  }

  nav.active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 15px 25px;
    width: 100%;
    color: #333;
    font-size: 1.15rem; /* slightly smaller on tablet */
    line-height: 1.3;
  }

  /* Dropdown menu inside mobile */
  .dropdown-menu {
    position: static;
    background: none;
    box-shadow: none;
    padding-left: 20px;
    display: none;
  }

  /* Disable hover-driven dropdowns on touch devices and rely on .open class */
  header nav .dropdown:hover .dropdown-menu { display: none !important; }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown > a::after {
    border-color: #333;
  }

  .hamburger {
    display: flex;
  }

  header {
    padding: 15px 20px;
  }

  /* Hide desktop donate only on mobile */
  .donate-btn:not(.mobile-donate) {
    display: none; /* Hide on mobile to simplify layout */
  }
  
  /* Ensure donate button inside the nav shows on mobile */
  .mobile-donate {
    display: block;
    width: calc(100% - 50px);
    margin: 10px 25px;
    padding: 12px 18px;
    background: #9b59b6;
    color: white;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif;
    letter-spacing: 3px;
  }

  /* Touch-friendly sizing for all nav links and buttons */
  .nav-links li, .nav-links a, .mobile-donate {
    min-height: 48px;
    -webkit-tap-highlight-color: rgba(0,0,0,0.05);
  }

  
  /* Make mobile nav fixed under the sticky header and scrollable */
  nav {
    position: fixed; /* stay in view while scrolling */
    top: 70px; /* sit under the header (matches menus.css header offset) */
    left: 0;
    width: 100%;
    height: calc(100vh - 70px); /* fill remaining viewport */
    overflow-y: auto;
    z-index: 999; /* sit above content but below header */
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(6px);
  }

  /* Make the nav active state visible and scrollable */
  nav.active {
    display: flex; /* keep the layout consistent with menus.css */
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 📱 Additional Mobile Tweak */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: none;
  }

  .dropdown-menu a {
    padding-left: 40px;
    font-size: 1.05rem;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  /* Disable hover-based dropdown expansion on mobile */
  header nav .dropdown:hover .dropdown-menu { display: none !important; }

  /* Slightly smaller nav links and touch-friendly padding */
  .nav-links a {
    font-size: 1.05rem;
    padding: 16px 22px;
  }

  .mobile-donate {
    font-size: 1rem;
    padding: 12px 16px;
    width: calc(100% - 40px);
    margin: 12px 20px;
  }
}