/* General styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Ensure full height */
  background-color: #f9f9f9;
}

/* Container styles */
.grid-container {
  display: grid; /* Use grid layout */
  grid-template-columns: repeat(3, 1fr); /* 3 columns by default */
  gap: 20px; /* Space between items */
  width: 90%; /* Limit the width for a centered layout */
  max-width: 800px; /* Ensure it doesn't stretch too far */
  margin: auto; /* Center the container */
}

/* Item styles */
.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  background-color: #fff;
  border-radius: 15px; /* Curved corners */
  overflow: hidden;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
  width: 250px;
  height: 250px;
  text-align: center;
  transition: transform 0.3s ease;
}

.grid-item:hover {
  transform: scale(1.05);
}

.grid-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.grid-item h3 {
  margin: 10px 0 0;
  font-size: 1rem;
}

/* Responsive design */
@media (max-width: 1024px) {
  /* For tablets or medium screens: 2 rows of 3 items */
  .grid-container {
    grid-template-columns: repeat(3, 1fr); /* Force 2 rows */
  }
}

@media (max-width: 768px) {
  /* For portrait/mobile view: 2 columns */
  .grid-container {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    grid-template-rows: auto; /* Adjust rows automatically */
  }
}

@media (max-width: 480px) {
  /* For very small screens: fallback to 1 column */
  .grid-container {
    grid-template-columns: 1fr;
  }
}

/* Add a black background color to the top navigation */
.topnav {
    background-color: #333;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }
  
  /* Style the links inside the navigation bar */
  .topnav a {
    float: left;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
  }
  
  /* Change the color of links on hover */
  .topnav a:hover {
    background-color: #ddd;
    color: black;
  }
  
  /* Add a color to the active/current link */
  .topnav a.active {
    background-color: #04AA6D;
    color: white;
  }

  .center {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .footer {
    background-color: #333; /* Light gray background */
    color: #FFF; /* Darker text for contrast */
    text-align: center;
    padding: 15px 10px; /* Space inside the footer */
    font-size: 0.9rem; /* Slightly smaller text */
    position: fixed; /* Make it stick to the bottom */
    bottom: 0;
    left: 0;
    width: 100%; /* Full width */
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  }

  