/* Filter Buttons */
.filters {
  margin: 0 auto 30px;
  text-align: center;
}
.filter-btn {
  background-color: #004080;
  border: none;
  color: white;
  padding: 10px 20px;
  margin: 5px 8px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.filter-btn:hover,
.filter-btn.active {
  background-color: #0066cc;
}

/* Portfolio Grid */
.portfolio-grid {
  margin: 20px 20px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 20 10px;
  
}
.portfolio-item {
  flex: 1;
  min-width: 270px;
  max-width: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  cursor: pointer;
  background: white;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.portfolio-item.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}
.portfolio-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.portfolio-item:hover .portfolio-image {
  transform: scale(1.1);
}


/* Overlay text on hover */
.overlay {
  position: absolute;
  bottom: 0;
  background: rgba(0,64,128,0.75);
  width: 100%;
  color: #fff;
  text-align: center;
  padding: 12px 10px;
  font-weight: 600;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}
.portfolio-item:hover .overlay {
  opacity: 1;
}

/* Modal */
#modal {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1000;
}
#modal.active {
  display: flex;
}
#modal-content {
  background: #fff;
  max-width: 700px;
  width: 100%;
  border-radius: 12px;
  overflow-y: auto;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
#modal-content img {
  width: 100%;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  height: 350px;
  object-fit: cover;
}
#modal-text {
  padding: 20px;
}
#modal-text h2 {
  margin-top: 0;
  color: #004080;
}
#modal-text p {
  color: #444;
  line-height: 1.5;
}
#modal-close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 2rem;
  font-weight: 700;
  color: #004080;
  cursor: pointer;
  user-select: none;
}



/* Responsive adjustments */
@media (max-width: 600px) {
  .portfolio-image {
    height: 140px;
  }
}
