/* --- Portfolio Page Specific Styles --- */

/* Filter Button Group */
.filter-btn-group {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.filter-btn {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
  padding: 0.65rem 1.35rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--color-yellow);
  color: #125288;
  border-color: var(--color-yellow);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(251, 186, 0, 0.3);
  transform: translateY(-2px);
}

/* Portfolio Grid Layout */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 576px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }
}

.portfolio-item {
  display: block;
  transition: all 0.3s ease;
}

.portfolio-item.hidden {
  display: none !important;
}

/* Gallery Card (No Title Text) */
.gallery-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  aspect-ratio: 4 / 3;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(18, 82, 136, 0.15);
  border-color: rgba(251, 186, 0, 0.4);
}

.gallery-thumbnail {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 82, 136, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-yellow);
  color: #125288;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transform: scale(0.7);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-card:hover .gallery-zoom-icon {
  transform: scale(1);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(8px);
}

.lightbox-container {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  max-width: 100%;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: lightboxPop 0.3s ease;
}

@keyframes lightboxPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--color-yellow);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 3;
}

.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }

@media (max-width: 768px) {
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { top: 10px; right: 15px; }
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--color-yellow);
  color: #125288;
  border-color: var(--color-yellow);
}

.lightbox-counter {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
}