body {
    background: #1f242d;
    margin-top: 5%;
  }
  
div {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}
div img:hover {
    filter:brightness(1);
    transform: scale(1.03);
}
  .navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
  }
  
  .card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
  }
  
  .card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 300px;
    text-align: center;
    padding: 20px;
  }
  
  .image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  
  .image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }
  
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    overflow-y: auto;
    text-align: center;
  }
  
  .modal-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .modal-image-grid img {
    width: 100%;
    height: auto;
    border-radius: 10px;
  }
  
  .close-button {
    position: absolute;
    top: 5px;
    right: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    cursor: pointer;
  }

  /* Display modal when targeted */
#modal:target {
    display: flex;
    }
  
  .view-button {
    background-color: #fff; /* Button background color */
    color: #000; /* Text color */
    border: 2px solid grey; /* Button border */
    border-radius: 20%; /* Rounded corners */
    margin: 0 auto; /* Centers the button horizontally */
    padding: 10px 20px; /* Adds space inside the button */
    display: inline-block; /* Ensures the button behaves like a box */
    text-align: center; /* Centers text within the button */
    font-size: 1rem; /* Adjust text size */
    cursor: pointer; /* Adds pointer on hover */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
    }
  
  /* Add hover effect for better UI */
.view-button:hover {
    background-color: #000; /* Changes background on hover */
    color: #fff; /* Text color matches the border */
    border-color: #000; /* Keeps border color consistent */
    }

  h2{
    font-size: 1.5rem;
margin: 20px;
  }

  /* Mobile devices (width <= 768px) */
@media (max-width: 768px) {
  .card-container {
      grid-template-columns: 1fr;
      padding: 20px;
  }

  .navbar ul {
      flex-direction: column;
      align-items: center;
  }

  .navbar .logo {
      font-size: 28px;
  }

  .navbar ul li {
      margin: 10px 0;
  }

  .home-info h1 {
      font-size: 40px;
  }

  .home-info h2 {
      font-size: 24px;
  }

  .home-info p {
      font-size: 14px;
  }

  .home-info .btn-sci {
      flex-direction: column;
  }

  .btn {
      padding: 8px 20px;
  }

  .home-img .img-box {
      width: 40vw;
      height: 40vw;
  }

  .home-img .img-box .img-item img {
      width: 150%;
  }

  .view-button {
      font-size: 14px;
      padding: 8px 16px;
  }

  .modal-content {
      padding: 10px;
      width: 100%;
  }

  .modal-image-grid img {
      max-width: 100%;
      height: auto;
  }
}

/* Tablet devices (width <= 1024px) */
@media (max-width: 1024px) {
  .card-container {
      grid-template-columns: repeat(2, 1fr);
      padding: 15px;
  }

  .navbar {
      padding: 20px;
  }

  .home-info h1 {
      font-size: 48px;
  }

  .home-info h2 {
      font-size: 28px;
  }

  .home-info p {
      font-size: 16px;
  }

  .home-img .img-box {
      width: 25vw;
      height: 25vw;
  }

  .home-img .img-box .img-item img {
      width: 180%;
  }

  .view-button {
      font-size: 16px;
      padding: 10px 20px;
  }

  .modal-content {
      width: 80%;
  }
}

/* Larger screens (width > 1024px) */
@media (min-width: 1025px) {
  .navbar {
      padding: 25px 15%;
  }

  .home-info h1 {
      font-size: 55px;
  }

  .home-info h2 {
      font-size: 32px;
  }

  .home-info p {
      font-size: 18px;
  }

  .home-img .img-box {
      width: 18vw;
      height: 18vw;
  }

  .home-img .img-box .img-item img {
      width: 200%;
  }
}
  