nav {
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin:-8px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 45px;
  width:45px;
}

.workmark {
  font-size: 23px;
  font-family: DM Sans;
  margin-left: 1rem;
}

.navbar-items {
  display: flex;
  list-style: none;
  margin: 0;
  font-family:Poppins;
}

.navbar-items li {
  margin-left: 1rem;
}

.navbar-items li:first-child {
  margin-left: 0;
}

.navbar-items a {
  text-decoration: none;
  color: #353535;
  font-weight: bold;
  text-transform: uppercase;
  padding: 10px;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

#about-item:hover {
  background-color: #e95459;
  color:white;
}

#math-item:hover {
  background-color: #ff9a52;
  color:white;
}

#science-item:hover {
  background-color: #ffe54f;
  color:white;
}

#reading-writing-item:hover {
  background-color: #5dbb63;
  color:white;
}

#homework-help-item:hover {
  background-color: #63c5da;
  color:white;
}

#test-prep-item:hover {
  background-color: #fc94af;
  color:white;
}

.toggle-button {
  display: none;
}

@media screen and (max-width: 768px) {
  .navbar-items {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 4rem;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .navbar-items li {
    margin: 0;
    border-top: 1px solid #f2f2f2;
  }

  .navbar-items a {
    display: block;
    padding: 1rem;
  }

  .toggle-button {
    display: block;
    background-color: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px auto;
    transition: transform 0.2s ease;
  }

  .bar:first-child {
    transform: translateY(-6px);
  }

  .bar:last-child {
    transform: translateY(6px);
  }

  .navbar-open .bar:first-child {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .navbar-open .bar:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .navbar-open .bar:nth-child(2) {
    opacity: 0;
  }

  .navbar-open .navbar-items {
    display: flex;
  }
}

#science-heading {
  text-align: center;
  padding:20px;
  font-family:Manrope;
}

.topic-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s;
  width: 300px;
}

.topic-card:hover {
  transform: translateY(-5px);
}

.topic-card h2 {
  color: #333;
  font-size: 32px;
  margin-bottom: 20px;
}

.topic-card p {
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
}

.topic-card button {
  background-color: #e95459;
  border: none;
  border-radius: 25px;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  padding: 12px 24px;
  transition: background-color 0.3s;
}

.topic-card button:hover {
  background-color: #d83c3f;
}

.biology {
  background-image: url('https://i.postimg.cc/VL2ZwNHR/science-biology.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.physics {
  background-image: url('https://i.postimg.cc/G2jx4G6h/science-physics.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.chemistry {
  background-image: url('https://i.postimg.cc/6QvXq8PN/science-chemistry.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}