/* Portfolio Page Styles */

/* Portfolio Hero Section */
.portfolio-hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: transparent; /* 배경색 제거 - 원인 1 */
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.portfolio-hero-section .hero-video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.portfolio-hero-section .hero-video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1 !important;
  display: block !important;
  z-index: -2 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

.portfolio-hero-section .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.6);
  z-index: 1;
}

.portfolio-hero-section .container {
  position: relative;
  z-index: 2;
}

.portfolio-hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.portfolio-hero-title {
  margin-bottom: 32px;
}

.title-line {
  display: block;
  font-family: "Black Han Sans", sans-serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 0.9;
  color: var(--primary-text);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(30px);
}

.title-line.highlight {
  color: var(--accent-red);
}

.portfolio-hero-description {
  font-family: var(--font-korean);
  font-size: 18px;
  font-weight: 400;
  color: var(--secondary-text);
  line-height: 1.7;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(30px);
}

.portfolio-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  opacity: 0;
  transform: translateY(30px);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: "Black Han Sans", sans-serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--accent-red);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary-text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Filter Section */
.portfolio-filter-section {
  padding: 40px 0;
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--primary-border);
  position: sticky;
  top: 80px;
  z-index: 100;
  width: 100%;
  min-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  gap: 40px;
}

.filter-categories {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--primary-border);
  color: var(--secondary-text);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s var(--ease-default);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: var(--primary-text);
  transform: translateY(-2px);
}

.filter-sort {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-dropdown {
  background: var(--card-bg);
  border: 1px solid var(--primary-border);
  color: var(--primary-text);
  font-family: var(--font-primary);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-default);
}

.sort-dropdown:focus {
  outline: none;
  border-color: var(--accent-red);
}

/* Portfolio Grid Section */
.portfolio-grid-section {
  padding: 80px 0;
  background: var(--primary-bg);
  width: 100%;
  min-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 40px;
  max-width: 1440px;
  margin: 0 auto;
}

.portfolio-item {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s var(--ease-default);
}

.portfolio-item.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.portfolio-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s var(--ease-default);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-default);
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s var(--ease-default);
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
  transform: translateY(0);
}

.project-info {
  color: var(--primary-text);
}

.project-title {
  font-family: "Black Han Sans", sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--primary-text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-category {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.project-description {
  font-family: var(--font-korean);
  font-size: 14px;
  color: var(--secondary-text);
  line-height: 1.6;
}

.project-actions {
  display: flex;
  gap: 12px;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--primary-border);
  color: var(--primary-text);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s var(--ease-default);
}

.view-btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.like-btn:hover {
  background: var(--primary-text);
  color: var(--primary-bg);
}

.portfolio-meta {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-badge {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--secondary-bg);
}

.project-badge.web {
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.1);
}

.project-badge.branding {
  color: #FF6B6B;
  background: rgba(255, 107, 107, 0.1);
}

.project-badge.marketing {
  color: #4ECDC4;
  background: rgba(78, 205, 196, 0.1);
}

.project-badge.ecommerce {
  color: #FFE66D;
  background: rgba(255, 230, 109, 0.1);
}

.project-year {
  font-family: var(--font-primary);
  font-size: 12px;
  color: var(--disabled-text);
  font-weight: 500;
}

/* Load More Section */
.load-more-section {
  text-align: center;
  margin-top: 80px;
}

.load-more-btn {
  background: var(--card-bg);
  border: 1px solid var(--primary-border);
  color: var(--primary-text);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 20px 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s var(--ease-default);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 16px;
}

.load-more-btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 59, 48, 0.3);
}

.btn-icon {
  font-size: 16px;
  transition: transform 0.3s var(--ease-default);
}

.load-more-btn:hover .btn-icon {
  transform: translateY(2px);
}

.load-more-info {
  font-family: var(--font-primary);
  font-size: 12px;
  color: var(--disabled-text);
  margin: 0;
}

/* Portfolio CTA Section */
.portfolio-cta-section {
  padding: 120px 0;
  background: var(--secondary-bg);
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.cta-video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.cta-video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-cta-section .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 17, 17, 0.8);
  z-index: 1;
}

.portfolio-cta-section .container {
  position: relative;
  z-index: 2;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-family: "Black Han Sans", sans-serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--primary-text);
  line-height: 1.2;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-description {
  font-family: var(--font-korean);
  font-size: 18px;
  color: var(--secondary-text);
  line-height: 1.7;
  margin-bottom: 48px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.cta-primary-btn,
.cta-secondary-btn {
  font-family: var(--font-korean);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 8px;
  transition: all 0.3s var(--ease-default);
  text-align: center;
  min-width: 200px;
}

.cta-primary-btn {
  background: var(--accent-red);
  color: var(--primary-text);
}

.cta-primary-btn:hover {
  background: #ff2d1f;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 59, 48, 0.3);
}

.cta-secondary-btn {
  background: transparent;
  color: var(--primary-text);
  border: 1px solid var(--primary-border);
}

.cta-secondary-btn:hover {
  background: var(--card-bg);
  border-color: var(--accent-red);
  transform: translateY(-2px);
}

/* Animation Classes */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-up {
  animation: slideInUp 0.8s ease-out forwards;
}

.animate-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .portfolio-hero-section {
    padding: 140px 0 60px;
  }
  
  .title-line {
    font-size: 42px;
  }
  
  .portfolio-hero-description {
    font-size: 16px;
    margin-bottom: 32px;
  }
  
  .portfolio-stats {
    flex-direction: column;
    gap: 24px;
  }
  
  .filter-bar {
    flex-direction: column;
    gap: 20px;
    padding: 0;
  }
  
  .filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0 20px;
  }
  
  /* 모바일에서 주요 필터만 표시 */
  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: auto;
    padding: 8px 16px;
    font-size: 12px;
  }
  
  /* 모바일에서 숨길 필터들 */
  .filter-btn[data-filter="marketing"],
  .filter-btn[data-filter="ecommerce"] {
    display: none;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .portfolio-overlay {
    padding: 24px;
  }
  
  .project-title {
    font-size: 20px;
  }
  
  .cta-title {
    font-size: 32px;
  }
  
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-primary-btn,
  .cta-secondary-btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .portfolio-hero-section {
    padding: 120px 0 40px;
  }
  
  .title-line {
    font-size: 32px;
  }
  
  .filter-categories {
    padding: 0 16px;
    gap: 6px;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
  
  /* 매우 작은 화면에서는 브랜딩도 숨기기 */
  .filter-btn[data-filter="branding"] {
    display: none;
  }
  
  .portfolio-grid {
    gap: 20px;
  }
  
  .portfolio-overlay {
    padding: 20px;
  }
  
  .project-title {
    font-size: 18px;
  }
  
  .cta-title {
    font-size: 28px;
  }
}

/* Loading States */
.portfolio-item.loading {
  opacity: 0.5;
  pointer-events: none;
}

.portfolio-item.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Smooth transitions for filtering */
.portfolio-item {
  transition: all 0.4s var(--ease-default);
}

.portfolio-item.filtering-out {
  opacity: 0;
  transform: scale(0.8) translateY(20px);
}

.portfolio-item.filtering-in {
  opacity: 1;
  transform: scale(1) translateY(0);
}