body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url('/images/negative-mandelbroad.png');
  background-size: cover;
  /* Always cover the full viewport */
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #ffffff;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}


/* Icon sizing for homepage and other sections */
.icon {
  height: 1em;
  vertical-align: text-bottom;
  margin-left: 0.15em;
  margin-right: 0.15em;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


a {
  text-decoration: none;
  color: inherit;
}

#mainWrapper {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr minmax(300px, 800px) 1fr;
  gap: 1rem;
}

/* Only apply larger background size on desktop for parallax */
@media (min-width: 769px) {
  body {
    background-size: 100% 105%;
    /* Will be overridden by JavaScript for dynamic scaling */
    background-position: center center;
    /* Will be overridden by JavaScript */
  }
}

/* GENERAL: Logo and navigation styles */
#header {
  grid-column: span 3;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;

}

#header #headerContainer {
  max-width: 850px;
  margin: 0 auto;
}

#header .first {
  display: flex;
  justify-content: space-between;
  /* space between items horizontally */
  align-items: center;
  /* center items vertically */

}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo {
  max-width: 40px;
  height: auto;
}

.logo-text {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* GENERAL: Sidebar and main content layout */
.left-sidebar {
  grid-column: span 1;
}

.right-sidebar {
  grid-column: span 1;
}

.main-content {
  grid-column: span 1;
  max-width: 800px;
  width: 100%;

  padding: 2rem;
  background-color: #ffffff;
  color: #000000;
  border-radius: 5px;
  border: 1px solid #000000;
  box-shadow: 0 20px 40px rgba(255, 255, 255, 0.1);

}

/* GENERAL: Footer styles */
.site-footer {
  grid-column: span 3;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact-column {
  text-align: center;
}

.contact-column h4 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: bold;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 0.5rem;
}

.contact-info h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: bold;
}

.contact-item {
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-direction: column;
}

.contact-column .contact-item {
  margin-bottom: 0.6rem;
}

.contact-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  min-width: 60px;
}

.contact-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.contact-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.contact-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.footer-note {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.footer-note p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin: 0;
}


.subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #333333;
  font-weight: 300;
  text-align: center;
}


/* GENERAL: Media queries for responsive design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .main-content {
    padding: 1.5rem;
  }



  .logo-text {
    font-size: 1.2rem;
  }

  .auth-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }





  .site-footer {
    margin-top: 1rem;
    padding: 1.5rem 1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .contact-column h4 {
    font-size: 1.1rem;
  }

  .contact-item {
    flex-direction: column;
    gap: 0.3rem;
  }

  .contact-label {
    min-width: auto;
  }

}

/* Header navigation styles */

#nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}



.nav-section {
  display: flex;
  align-items: center;
}

/* Hamburger menu styles */
#nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: red;
  cursor: pointer;
  margin-left: 1rem;
  z-index: 200;
}

.hamburger {
  width: 28px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s;
  display: block;
  /* Center transform origin for rotation */
  transform-origin: center;
}

#nav-toggle.open .hamburger:nth-child(1) {
  transform: translateY(+13px) rotate(45deg);
}

#nav-toggle.open .hamburger:nth-child(2) {
  opacity: 0;
}

#nav-toggle.open .hamburger:nth-child(3) {
  transform: translateY(-13px) rotate(-45deg);
}




#header .nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.5);
}

#header .nav-link.admin-nav-link {
  background: #580b0b;

}

#header .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.auth-section {
  display: flex;
  align-items: center;
}

.logout-form {
  margin: 0;
  padding: 0;
}

.auth-link {
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  font-size: 0.9rem;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.auth-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}



#nav-menu2 {
  display: flex;
  gap: 1rem;





  transition: all 0.1s;
  max-height: 0px;
  margin-top: 0px;
}

#nav-menu2 .nav-link {
  flex: 1 1 0;
  min-width: 0;

  text-align: center;

  transition: all 0.5s ease;
  transform: scale(0.0);
  opacity: 0;


}






@media (max-width: 650px) {
  #nav-menu2.open {
    margin-top: 10px;
    max-height: 500px;

  }

  #nav-menu2.open .nav-link {


    transform: scale(1);
    opacity: 1;

  }

  #header {
    padding: 0.5rem;
  }

  #nav-toggle {
    display: flex;
  }

  #header .nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  #nav-menu {
    gap: 0.5rem;
  }

  #nav-menu .pages {
    display: none;

  }



}



/* Main content layout */
@media (max-width: 800px) {

  .left-sidebar:empty,
  .right-sidebar:empty {
    display: none;
  }

  .left-sidebar,
  .right-sidebar {
    grid-column: span 3;

    border: none;
    border-radius: 0;
    max-width: 100%;
  }

  .main-content {
    grid-column: span 3;
    padding: 1.5rem;
    border: none;
    border-radius: 0;
    max-width: 100%;
  }

}