/* ==========================================
   1. PORTFOLIO PAGE HERO SECTION
   ========================================== */
#portfolio-hero {
  position: relative;
  min-height: 40vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  background-color: var(--hero-bg, #080808);
}

#portfolio-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0.65) 0%, rgba(8, 8, 8, 0.95) 100%);
  z-index: 1;
}

#portfolio-hero .hero-content {
  position: relative;
  z-index: 2;
}

/* ==========================================
   2. CATEGORY FILTERS BAR
   ========================================== */
#portfolio-filters {
  background-color: #080808;
}

/* Active Filter Button */
.btn-filter-active {
  background-color: #f14141 !important;
  border: 1px solid #f14141 !important;
  color: #ffffff !important;
  border-radius: 50rem;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(241, 65, 65, 0.3) !important;
}

/* Non-Active Filter Button */
.btn-filter {
  background-color: transparent !important;
  border: 1px solid #f14141 !important;
  color: #ffffff !important;
  border-radius: 50rem;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
}

/* Hover Effect on Non-Active Filter Buttons */
.btn-filter:hover {
  background-color: #f14141 !important;
  border-color: #f14141 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(241, 65, 65, 0.2) !important;
}

/* ==========================================
   3. PORTFOLIO GRID & CARDS
   ========================================== */
#portfolio-gallery {
  background-color: #080808;
  min-height: 500px;
}

.portfolio-card {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  border-color: rgba(241, 65, 65, 0.3);
}

.portfolio-img-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
}

.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-card:hover .portfolio-img {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0.9;
  transition: opacity 0.4s ease, background 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(241, 65, 65, 0.25) 75%, transparent 100%);
}

.portfolio-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.portfolio-desc {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 12px;
}

/* Action Icon Buttons */
.portfolio-action-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #f14141;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f14141;
  transition: all 0.3s ease;
  text-decoration: none;
}

.portfolio-action-btn:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #f14141;
  transform: scale(1.1);
}

.video-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(241, 65, 65, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.portfolio-card:hover .video-play-badge {
  transform: translate(-50%, -50%) scale(1.15);
}

/* ==========================================
   4. LIGHTBOX & PREVIEW MODAL
   ========================================== */
#portfolioModal .modal-content {
  background-color: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#portfolioModal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================
   5. LOAD MORE BUTTON
   ========================================== */
.btn-load-more {
  background-color: #f14141;
  border: 2px solid #f14141;
  color: #ffffff;
  border-radius: 50rem;
  padding: 12px 32px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-load-more:hover {
  background-color: #d63333;
  border-color: #d63333;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(241, 65, 65, 0.4);
}