/* General Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #dae8f5;
  color: #4a2c2a;
}

header {
  background: #8cb6dc;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

header nav button {
  margin: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: #dae8f5;
  color: #4a2c2a;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.3s ease;
}

header nav button.active {
  background: #ff6b6b;
  color: white;
  border-radius: 30px;
}

header nav button:hover {
  background: #e55b5b;
  color: white;
}

/* Style the logo link */
a.logo {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}


/* Content Containers */
.content-container {
  padding: 2rem;
  display: none;
}

.content-container.active {
  display: block;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Default for desktop: 4 columns */
  gap: 1.5rem;
  padding: 1rem;
}

/* Mobile and Tablet */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2,
        1fr);
    /* 2 columns for mobile and tablets */
  }
}

/* Card Styles */
.card {
  background: #f2f9ff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card img {
  max-width: 100%;
  border-radius: 8px;
  cursor: pointer;
}

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #ff6b6b;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.button:hover {
  background: #e55b5b;
}

/* Popup Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  max-width: 90%;
  /* Ensure the popup container itself is responsive */
  max-height: 90%;
  /* Limit the popup image's maximum size */
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 15%;
  /* Adding margin to ensure 15% padding around the image in mobile */
}

.popup-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* Preserve aspect ratio */
}

/* Mobile-Specific Popup Image Styling */
@media (max-width: 768px) {
  .popup-content {
    padding: 15%;
    /* Add 15% padding on mobile view to give space around the image */
  }

  .popup-content img {
    width: 70%;
    /* Adjust the image size in mobile view, 70% of the container width */
    max-width: 100%;
    height: auto;
  }
}

/* Close Button */
.close-button {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 10px;
  right: 10px;
  background: #7bcbe9;
  color: white;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
}

.close-button:hover {
  background: #6892df;
}

/* Utility Classes */
.hidden {
  display: none;
}

.oopsMsg {
  text-align: center;
  margin-top: 8%;
}