/* Tablets: 768px and below */
@media only screen and (max-width: 768px) {
  header nav ul.menu {
    flex-direction: column;
    background-color: #623e2a;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: none;
  }

  #check:checked ~ ul.menu {
    display: flex;
  }

  .hero-video video {
    width: 100%;
    height: auto;
  }

  .welcome-message h1,
  .collection-message h1,
  .container h1 {
    font-size: 1.5em;
  }

  .intro,
  .featured,
  .collection,
  .contact-form,
  .contact-info,
  .about,
  .about-image,
  .about-message {
    padding: 20px;
  }

  .poem-card,
  .collection-box {
    width: 85%;
    margin: 20px auto;
  }

  .row,
  .cta-buttons,
  .search-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .search-container input {
    width: 100%;
    margin-bottom: 10px;
  }

  .card-container {
    padding: 40px 10px;
    gap: 16px;
  }

  .card {
    max-width: 100%;
  }

  .card-content h1 {
    font-size: 20px;
  }

  .card-content p {
    font-size: 14px;
  }
}

/* Mobile: 480px and below */
@media only screen and (max-width: 480px) {
  .menu {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80%;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 100%;
    z-index: 100;
    background-color: #623e2a;
    transition: all 0.2s ease-in-out;
  }

  #check:checked ~ .menu {
    right: 0;
  }

  .menu li {
    margin-top: 40px;
  }

  .menu li a {
    padding: 10px;
  }

  .open-menu,
  .close-menu {
    display: block;
  }

  .collection-box {
    width: 90%;
    height: auto;
  }

  .collection-box h2,
  .container h1 {
    font-size: 16px;
  }

  .container {
    padding: 20px;
  }

  .form-group input[type="text"],
  .form-group input[type="password"],
  input[type="submit"] {
    font-size: 16px;
    padding: 10px;
  }

  .sign-up,
  .text {
    font-size: 14px;
  }

  .card {
    width: 90%;
  }
}