@media (max-width: 1024px) and (min-width: 501px) {
  #grid {
    display: grid;
    grid-template-columns: 5;
    grid-template-rows: 12;
    gap: 1.5rem;

    margin: 10.2rem auto;
    padding: 0 1rem;
  }
  /* nav bar */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* full width */
    display: flex;
    justify-content: center; /* centers the logo */
    align-items: center; /* vertical centering */
    z-index: 10;
  }

  .logo {
    width: 40%;
    padding-right: 15%;
  }
  /* hamburger for phone */

  .toggle {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    width: 60px;
    height: 60px;
    cursor: pointer;
    opacity: 0;
  }

  .hamburger {
    position: absolute;
    left: 1rem; /* stick to the left side */
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    padding: 0;
    z-index: 12;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hamburger > div {
    position: relative;
    width: 100%;
    height: 3px;
    background: gray;
    transition: all 0.5s ease;
  }

  .hamburger > div::before,
  .hamburger > div::after {
    content: "";
    position: absolute;
    z-index: 10;
    width: 100%;
    height: 3px;
    background: gray;
  }

  .hamburger > div::before {
    top: -10px;
  }
  .hamburger > div::after {
    top: 10px;
  }

  .toggle:checked + .hamburger > div {
    transform: rotate(135deg);
  }

  .toggle:checked + .hamburger > div::before,
  .toggle:checked + .hamburger > div::after {
    top: 0;
    transform: rotate(90deg);
  }

  .menu .circle {
    z-index: 9;
  }

  .toggle:checked + .hamburger,
  .toggle:checked + .hamburger > div,
  .toggle:checked + .hamburger > div::before,
  .toggle:checked + .hamburger > div::after {
    z-index: 20 !important;
  }

  /* hover  */

  .toggle:checked:hover + .hamburger > div {
    transform: rotate(225deg);
  }

  .toggle:checked ~ .menu {
    visibility: visible;
  }

  .toggle:checked ~ .menu .circle {
    transform: scale(1);
  }

  /* menu in the middle */
  .menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    overflow: hidden;
    z-index: 10;
  }

  .menu .circle {
    background: #404e41; 
    border-radius: 50%;
    width: 200vw;
    height: 200vh;
    position: absolute;
    top: -50vh;
    left: -50vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: scale(0);
    transition: transform 0.5s ease;
    z-index: 11;
  }

  .menu ul {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  .menu li {
    list-style: none;
    font-size: 2.5rem;
    font-family: Oxygen, sans-serif;
    padding: 15px;
    color: white;
    z-index: 12;
  }

  .menu a {
    text-decoration: none;
    color: white;
  }

  .menu a:hover {
    color: #ccc; 
  }

  /* homepage  */

  /*  hero section */

  .Hero {
    width: 100%;
    height: 60vh;
    text-align: center;

  }

  .title {
    margin-left: 30px;
    margin-right: 30px;
    font-size: 4.3rem;
    margin-top: 150px;
  }
  .sub1 {
    font-size: 1.5rem;
  
  }

  /* quote section */

  .Quote > p {
    font-size: 1.5rem;
    margin-left: 30px;
    margin-right: 30px;
    text-align: center;
  }

  /* about section */

  .about {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .aboutsection > h1 {
    font-size: 3rem;
  }

  .aboutsection > p {
    font-size: 1.5rem;
    margin-top: 10px;
  }

  .aboutimage {
    width: 90vw;
    height: 60vh;
  }

  /* contact page */
.form {
  max-width: 800px;
  height: 80vh;
  margin: 200px auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

  .formTitle {
    font-size: 2.5rem;
    margin-bottom: 30px;
  }
}
