/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: white;
}

.nav {
  z-index: 10000;
}

body {
  padding-top: 90px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

.logo {
  margin-top: 1rem;
  font-size: 2rem;
  line-height: 1;
}

.logo-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}

.logo-link:hover,
.logo-link:focus {
  text-decoration: underline;
}

/* Navigation Buttons */

/* Mobile */

/* Position of nav buttons */
.nav-wrapper {
  position: relative;
  margin-left: auto;
}

/* Hamburger menu button exterior styling */
.nav-toggle {
  display: block;
  font-size: 2rem;
  background: none;
  cursor: pointer;
  color: var(--green);
  margin-left: auto;
  padding: 0.5rem;
  position: relative;
  z-index: 1001;
}

/* Hamburger menu visibility on hover */
.nav-wrapper:hover .nav {
  max-height: 600px;
  opacity: 1;
  pointer-events: auto;
}

/* Extend hover area */
.nav-toggle::before {
  content: "";
  position: absolute;
  top: -1rem;
  bottom: -1rem;
  left: -1rem;
  right: -1rem;
}

/* Hamburger menu container styling */
.nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: max-content;
  min-width: 150px;
  z-index: 1000;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

/* Hamburger menu button interior styling */
.nav a {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.5rem 1rem;
  font-size: 1.15rem;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--border-grey);
  background-color: var(--green);
  color: white;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Hamburger menu visual feedback while hovering */
.nav a:hover {
  background-color: var(--light-bg);
  color: var(--green);
  border-color: var(--border-grey);
}

/* Desktop Styles */

@media (min-width: 1051px) {
  .nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    max-height: none;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    position: static;
    padding: 0;
    border: none;
    box-shadow: none;
  }

  .nav a {
    width: auto;
    margin: 0;
    padding: 0.2rem 0.76em;
    border: 1px solid var(--border-grey);
  }

  /* Hamburger button visibility */
  .nav-toggle {
    display: none;
  }

  /* Larger logo on desktop */
  .logo {
    font-size: 2.6rem;
  }
}