.gd-portfolio-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 1.15rem; font-weight: 700; color: var(--white); }
.gd-portfolio-header i:first-child { color: var(--accent); margin-right: 6px; }
.gd-view-all { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--gray); text-decoration: none; transition: color 0.3s ease; white-space: nowrap; }
.gd-view-all i { font-size: 0.7rem; transition: transform 0.3s ease; }
.gd-view-all:hover { color: #D32F2F; }
.gd-view-all:hover i { transform: translateX(4px); }

.gd-gallery-wrapper { overflow: hidden; mask-image: linear-gradient(to right, transparent 0%, black 40px, black calc(100% - 40px), transparent 100%); -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40px, black calc(100% - 40px), transparent 100%); }
.gd-gallery-track { display: flex; gap: 20px; width: max-content; animation: pfGalleryScroll 60s linear infinite; padding: 16px 0; }
.gd-gallery-wrapper:hover .gd-gallery-track { animation-play-state: paused; }

.gd-gallery-item { flex: 0 0 300px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border-color); position: relative; cursor: pointer; background: var(--card-bg); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.gd-gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.gd-gallery-item .gd-card-img { width: 100%; height: 220px; object-fit: cover; transition: transform 0.5s ease; display: block; }
.gd-gallery-item:hover .gd-card-img { transform: scale(1.08); }
.gd-gallery-item .gd-card-info { padding: 14px 16px; background: var(--card-bg); position: relative; z-index: 1; }
.gd-gallery-item .gd-card-info h4 { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-gallery-item .gd-card-info .gd-category { font-size: 0.78rem; color: var(--gray); font-weight: 500; }

.gd-gallery-overlay { position: absolute; top: 0; left: 0; right: 0; height: 220px; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; opacity: 0; transition: opacity 0.4s ease; }
.gd-gallery-item:hover .gd-gallery-overlay { opacity: 1; }
.gd-gallery-overlay h4 { color: #ffffff; font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.gd-gallery-overlay span { color: rgba(255,255,255,0.7); font-size: 0.75rem; display: block; }

.gd-gallery-tag { position: absolute; top: 12px; left: 12px; padding: 3px 12px; border-radius: 50px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.3px; z-index: 2; background: var(--accent); color: #ffffff; }
.gd-gallery-item:nth-child(even) .gd-gallery-tag { background: #D32F2F; }

@keyframes pfGalleryScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 1024px) {
  .gd-gallery-track { animation-duration: 55s; gap: 16px; }
  .gd-gallery-item { flex: 0 0 260px; }
  .gd-gallery-item .gd-card-img { height: 190px; }
  .gd-gallery-overlay { height: 190px; }
}
@media (max-width: 768px) {
  .gd-gallery-track { animation-duration: 50s; gap: 14px; padding: 12px 0; }
  .gd-gallery-item { flex: 0 0 230px; }
  .gd-gallery-item .gd-card-img { height: 170px; }
  .gd-gallery-overlay { height: 170px; }
  .gd-gallery-item .gd-card-info { padding: 10px 12px; }
  .gd-gallery-item .gd-card-info h4 { font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .gd-gallery-track { animation-duration: 45s; gap: 12px; }
  .gd-gallery-item { flex: 0 0 200px; }
  .gd-gallery-item .gd-card-img { height: 150px; }
  .gd-gallery-overlay { height: 150px; }
}

.gd-grid-view { display: none; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; padding: 16px 0; }
.gd-grid-view.gd-visible { display: grid; }
.gd-grid-view .gd-gallery-item { flex: none; width: 100%; }
.gd-grid-view .gd-gallery-item .gd-card-img { height: 200px; }
.gd-grid-view .gd-gallery-overlay { height: 200px; }
.gd-gallery-wrapper.gd-hidden { display: none; }
