/* RESET AND BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  line-height: 1.4;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: left;
  width: 100%;
  height: 70px;
  padding: 0 20px;
  background: white;
  color: black;
  font-size: 30px;
  font-weight: bold;
}

.heading {
  margin-left: 20px;
}

.logo {
  display: block;
  height: 60px;
}

/* MENUBAR */
.menubar {
  background: #7f4f24;
  width: 100%;
  display: flex;
  justify-content: left;
  align-items: center;
  position: fixed;
  top: 70px;
  z-index: 999;
}

.menubar ul {
  display: flex;
  list-style: none;
}

.menubar ul li {
  padding: 10px 15px;
}

.menubar ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

.menubar ul li a:hover {
  background: black;
  border-radius: 5px;
}

.material-symbols-outlined {
  font-size: 20px;
  margin-left: 5px;
}

.first-sub-menu, .second-sub-menu {
  display: none;
  position: absolute;
  background: #936639;
}

.menubar ul li:hover .first-sub-menu {
  display: block;
  margin-top: 5px;
}

.menubar ul li:hover .first-sub-menu ul {
  display: block;
}

.menubar ul li:hover .first-sub-menu ul li {
  padding: 5px;
  width: 180px;
  border-bottom: 1px dotted #fff;
}

.menubar ul li:hover .first-sub-menu ul li:last-child {
  border-bottom: none;
}

.hover-me:hover .second-sub-menu {
  display: block;
  background: #b6ad90;
  margin-left: 140px;
  margin-top: -28px;
}

.pageheading {
  margin-left: 80px;
  margin-top: 50px;
  font-size: 25px;
  margin-bottom: 10px; 
}

.publications {
  margin-left: 80px;
  font-size: 15px;
}

/* FORM AND CONTAINER */
.container, .form-container {
  background: white;
  padding: 20px;
  max-width: 500px;
  margin: 50px auto 40px 70px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

input, textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  flex-wrap: wrap;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  flex: 1 1 45%;
  margin: 5px;
}

button[type="submit"] {
  background: #4CAF50;
  color: white;
}

button[type="reset"] {
  background: #f44336;
  color: white;
}

button:hover {
  opacity: 0.9;
}

.success {
  text-align: center;
  color: green;
}

/* CARD */
.card {
  margin: 140px auto 40px 70px;
  height: auto;
  max-width: 300px;
  padding: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 8px rgba(255, 0, 0, 0.5);
  border-radius: 10px;
  color: white;
  font-size: 1.2em;
  transition: 0.3s;
}

.card:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* PAGE LAYOUT */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding-top: 110px;
}

footer {
  background: #7f4f24;
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 12px;
}

.hilliards-section {
  margin-left: 80px;
  margin-top: 50px;
}

.hilliards-section .pageheading {
  margin-bottom: 10px;
}

.hilliards-section a {
  margin-top: 5px;
  display: block;
  font-weight: bold;
  color: #2a5d84;
}


/* MEDIA QUERIES */
@media (max-width: 768px) {
  header {
    position: static; /* Change header position to static */
    flex-direction: column;
    font-size: 20px;
    height: auto;
    padding: 10px;
    text-align: center;
  }

  .logo {
    height: 50px;
  }

  .menubar {
    flex-direction: column;
    align-items: stretch;
    position: static; /* This is already set correctly for the menubar */
    width: 100%;
  }

  .menubar ul {
    flex-direction: column;
    width: 100%;
    padding-left: 0;
  }

  .menubar ul li {
    width: 100%;
    text-align: left;
    border-top: 1px solid #fff;
    padding: 5px 10px;
  }

  .menubar ul li a {
    display: block;
    width: 100%;
  }

  .first-sub-menu, .second-sub-menu {
    position: static;
    display: none;
    background: none;
    margin: 0;
    padding-left: 10px;
  }

  .first-sub-menu ul, .second-sub-menu ul {
    display: none; /* Keep this to hide sub-menus by default (as per your previous request) */
  }

  /* Explicitly hide first-level sub-menus on hover for small screens */
  .menubar ul li:hover .first-sub-menu {
    display: block;
  }

  /* Explicitly hide second-level sub-menus on hover for small screens */
  .hover-me:hover .second-sub-menu {
    display: block;
    width: 190px;
    background: #b6ad90;
    margin-left: 175px;
    margin-top:-26px;
  }

/* Adjust main content padding if it was used to clear a fixed header */
  main {
    padding-top: 0; /* Reset padding-top if the header is no longer fixed */
  }

  /* ... (rest of your existing media query styles) ... */
}