/* 
=========================================
  IDEACHAT - PORTFOLIO PAGE STYLES
=========================================
*/

/* 1. Header Hero */
.portfolio-hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-dark), #1E293B);
  color: var(--text-light);
  padding: 160px 0 100px 0;
  text-align: center;
  overflow: hidden;
}

.portfolio-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, rgba(var(--accent-rgb), 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.portfolio-hero h1 {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* 2. Portfolio Filters */
.filter-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 50px;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-normal);
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* 3. Portfolio Grid & Cards */
.portfolio-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
  min-height: 400px;
}

.portfolio-item-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  background-color: #ffffff;
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.portfolio-item-card.hidden {
  display: none;
}

.portfolio-card-img-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background-color: #f1f5f9;
}

.portfolio-card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

/* Glass Hover Overlay */
.portfolio-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85); /* Dark Glass */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  opacity: 0;
  transition: var(--transition-normal);
  z-index: 2;
}

.portfolio-item-card:hover .portfolio-card-overlay {
  opacity: 1;
}

.portfolio-item-card:hover .portfolio-card-img-box img {
  transform: scale(1.08);
}

.lightbox-trigger-btn {
  width: 50px;
  height: 50px;
  background-color: var(--accent);
  color: var(--text-light);
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  margin-bottom: 15px;
  transform: translateY(20px);
  transition: var(--transition-normal);
}

.portfolio-item-card:hover .lightbox-trigger-btn {
  transform: translateY(0);
}

.lightbox-trigger-btn:hover {
  background-color: var(--primary);
  transform: scale(1.1);
}

.portfolio-card-title {
  color: var(--text-light);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.portfolio-card-category {
  color: #94A3B8;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 4. Lightbox Overlay Styles */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95); /* Ultra dark */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

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

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  transform: scale(0.95);
  transition: transform 0.4s ease;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-caption {
  color: var(--text-light);
  margin-top: 20px;
  text-align: center;
}

.lightbox-caption h4 {
  color: var(--text-light);
  font-size: 20px;
  margin-bottom: 5px;
}

.lightbox-caption p {
  color: #94A3B8;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: #94A3B8;
  font-size: 32px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--text-light);
  transform: scale(1.1);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 40px;
  background: none;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 20px;
  z-index: 10;
}

.lightbox-nav-btn:hover {
  color: var(--text-light);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* 5. Pagination Style */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-number-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.page-number-btn:hover,
.page-number-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
}

@media (max-width: 768px) {
  .lightbox-nav-btn {
    font-size: 30px;
    padding: 10px;
  }
  .lightbox-prev {
    left: 5px;
  }
  .lightbox-next {
    right: 5px;
  }
}
