@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600');

/* ##################################################
   ------------ Gallery styles ------------
   Strctured for mobile screens first with larger 
   screens handled via media queries at the end
   ################################################## */




.article-header {
  display: block;
}
/* Style the buttons */
.nav-btn {
  border: none;
  outline: none;
  padding: 12px 16px;
  background-color: white;
  cursor: pointer;
}

/* Add a grey background color on mouse-over */
.nav-btn:hover {
  background-color: #ddd;
}

/* Add a dark background color to the active button */
.nav-btn.active {
  background-color: #666;
  color: white;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;           /* Add space between columns */
  padding: 8px;
}

/* Create up to three equal columns, initially hidden
   to facilitate filtering */
.column {
  flex: 1 1 calc(100% - 16px);  /* 33.33% width minus gap */
  display: none;
}

/* Individual content cards */
.column-content {
  background-color: white;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  height: 100%;           /* Allow cards to expand based on content */
  max-width: 70vw;
  margin: 0 auto;
}

.column-content img {
  max-width: 100%;
  height: auto;
  padding: 10px;
  object-fit: contain;  /* Ensure the image fits within the container */
  cursor: pointer;
}

.column-content h4, .column-content p {
  margin: 10px 0;
}

/* Show filtered/selected content cards */
.show-content {
  display: block;
}

/* Gallery modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(94, 94, 94, 0.5);
  z-index: 998;
  backdrop-filter: blur(5px);
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(56, 62, 66, 0.4);
  z-index: 999;
  padding: 0;
  box-sizing: border-box;
  overflow: auto;
  width: 90%;
  height: 80%;
  opacity: 0;
  animation: fadeInModal 1s ease forwards;
  text-align: center;
}

.modal-content {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.modal-close {
  color: white;
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

.modal-overlay.show {
  display: block;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}




/* ------------ Styles for Larger Screens ------------ */

@media only screen and (min-width: 768px) {

  /* Show two cards per row */
  .column {
    flex: 1 1 calc(50% - 16px);
  }

  /* Modal */
  .modal {
    width: 70%;
    padding: 0;
  }

  .modal-content {
    max-width: 90%;
    max-height: 90%;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }
}

@media only screen and (min-width: 1024px) {

  /* Show three cards per row */
  .column {
    flex: 1 1 calc(33.33% - 16px);
  }
}