/* Nest all Project 2 page styling in the .project2-container class.
Any styling previously applied to either * or body should be placed
at the top of the class selector. */

.project2-container {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #900404;
  * {
    box-sizing: border-box;
  }

  p {
    max-width: 80ch;
  }

  img {
    width: 100%;
  }

  header {
    padding: 1rem;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    font-family: "Irish Grover", cursive;
  }

  .catalog {
    display: grid;
    gap: 1rem;
    padding: 2rem;
    grid-template-columns: repeat(2, 1fr);
  }

  @media (min-width: 800px) {
    .catalog {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (min-width: 1100px) {
    .catalog {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  .card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
  }

  .card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .card img {
    max-width: 100%;
    border-radius: 4px;
  }

  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }

  .modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    text-align: center;
    position: relative;
  }

  .modal-content img {
    max-width: 100%;
    margin-bottom: 1rem;
    border-radius: 6px;
  }

  .close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s ease;
  }

  .close-button:hover {
    color: #000;
  }

  .documentation {
    padding: 2rem;
    background-color: #f8f8f8;
  }

  .documentation img {
    width: 200px;
    margin: 1rem;
  }

  .documentation {
    padding: 2rem;
    background-color: #f8f8f8;
    width: 80%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .doc-item {
    margin-bottom: 1.5rem;
  }

  .doc-item img {
    width: 650px;
    border: 1px solid #ccc;
    border-radius: 6px;
  }

  .caption {
    font-style: italic;
    font-size: 0.95rem;
    margin-top: 0.5rem;
  }

  /* media queries - keep at bottom */

  @media (max-width: 800px) {
    .catalog {
      grid-template-columns: repeat(2, 1fr);
      padding: 1rem;
    }

    .card {
      padding: 0.75rem;
    }

    .modal-content {
      width: 90%;
      padding: 1.5rem;
    }

    .doc-item img {
      width: 100%;
    }
  }

  @media (max-width: 480px) {
    .catalog {
      grid-template-columns: 1fr;
      padding: 1rem 0.5rem;
    }

    .card {
      padding: 0.5rem;
      font-size: 0.9rem;
    }

    .modal-content {
      padding: 1rem;
      font-size: 0.95rem;
    }

    .documentation {
      width: 95%;
      padding: 1rem;
    }

    .doc-item img {
      width: 100%;
    }

    .caption {
      font-size: 0.85rem;
    }
  }
}
