/* =============================================
   card_project.css
   ============================================= */

/* 프로젝트 카드 그리드 - 한 행에 4개 배치 */
.project-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10pt;
    justify-content: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

  /* 프로젝트 카드 기본 스타일  */
  .project-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 360px;
    height: 220px; /* Entry 프로젝트용 높이 증가 */
    display: flex;
    flex-direction: column; /* 세로 배치로 복원 */
    padding: 20px;
    background-color: white;
    position: relative;
    box-sizing: border-box;
    justify-self: center; /* 그리드 셀 내에서 중앙 정렬 */
  }
  
  .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    cursor: pointer;
  }
  
  /* 카드 이미지 영역 - 상단에 배치 */
  .project-card-image {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 8px;
  }
  
  .project-card-image img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
  }
  
  /* 카드 콘텐츠 영역 */
  .project-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  /* 카드 제목 */
  .project-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 2.6em; /* 2줄 공간 확보 */
  }
  
  /* 카드 설명 */
  .project-card-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1; /* 남은 공간 차지 */
  }
  
  /* CT 요소 태그 */
  .project-card-tags {
    margin-bottom: 20px; /* 여백 증가 */
    display: flex;
    flex-wrap: wrap; /* 태그들이 줄바꿈 되도록 */
    align-items: center;
    gap: 8px; /* 태그들 사이 간격 */
    min-height: 32px; /* 높이 증가 */
  }
  
  .project-card-tag {
    font-size: 0.85rem;
    color: #495057;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px; /* 패딩 추가 */
    border-radius: 12px; /* 둥근 모서리 */
    background-color: #f8f9fa; /* 배경색 추가 */
    white-space: nowrap; /* 줄바꿈 방지 */
   }
  
  .project-card-tag i {
    margin-right: 4px;
    font-size: 0.8rem;
    color: #6c757d;
  }
  
  /* 커스터마이징 태그 특별 스타일 */
  .project-card-tag.customization-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
  }
  
  .project-card-tag.customization-tag i {
    color: white;
    font-size: 0.9rem;
  }
  
  /* 버튼 그룹 영역 - 하단 중앙 */
  .project-card-actions {
    display: flex;
    flex-direction: column; /* 세로 배치로 변경 */
    justify-content: center;
    align-items: center;
    gap: 8px; /* 버튼 그룹들 사이 간격 */
    margin-top: auto; /* 카드 하단에 고정 */
  }
  
  /* 버튼 그룹 */
  .project-card-btn-group {
    display: inline-flex;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0; /* 하단 여백 제거 */
  }
  
  .project-card-btn-group > .btn {
    font-size: 0.85rem;
    padding: 8px 16px;
    border: none;
    min-width: auto;
    transition: all 0.2s;
  }
  
  .project-card-btn-group > .btn:first-child {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
  }
  
  .project-card-btn-group > .btn:last-child {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
  }
  
  /* PPT 버튼 - 우상단 배치 */
  .project-ppt-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: white;
    color: #6c757d;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .project-ppt-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
    border-color: #adb5bd;
  }
  
  /* 기존 방식 버튼 - 우하단 배치 */
  .entry-legacy-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #6c757d;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 2;
  }
  
  .entry-legacy-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
  
  .entry-legacy-btn i {
    margin-right: 4px;
    font-size: 0.7rem;
  }
  
  /* 반응형 조정 */
  @media (max-width: 1920px) {
    /* 대형 화면에서도 4개 유지 */
    .project-card-grid {
      grid-template-columns: repeat(4, 1fr);
      max-width: 2000px;
    }
  }
  
  @media (max-width: 1600px) {
    /* 중대형 화면: 3개로 줄임 */
    .project-card-grid {
      grid-template-columns: repeat(3, 1fr);
      max-width: 1500px;
    }
  }
  
  @media (max-width: 1200px) {
  /* 중형 화면: 2개로 줄임 */
  .project-card-grid {
  grid-template-columns: repeat(2, 1fr);
  max-width: 1000px;
  }
  
  .project-card {
  width: 450px;
  height: 380px; /* 반응형에서도 높이 증가 */
  }
  }
  
  @media (max-width: 992px) {
    /* 태블릿: 2개 유지하되 카드 크기 축소 */
    .project-card {
      width: 400px;
      height: 340px; /* 태블릿에서도 높이 증가 */
      padding: 15px;
    }
    
    .project-card-image {
      height: 120px;
      margin-bottom: 12px;
    }
    
    .project-card-image img {
      max-width: 100px;
      max-height: 100px;
    }
    
    .project-card-title {
      font-size: 1.1rem;
    }
    
    .project-card-description {
      font-size: 0.85rem;
    }
  }
  
  @media (max-width: 768px) {
    /* 모바일: 1개씩 배치 */
    .project-card-grid {
      grid-template-columns: 1fr;
      max-width: 500px;
    }
    
    .project-card {
      width: 100%;
      max-width: 480px;
      height: 360px; /* 모바일에서도 높이 증가 */
      padding: 15px;
      margin: 0 auto;
    }
    
    .project-card-image {
      height: 100px;
      margin-bottom: 10px;
    }
    
    .project-card-image img {
      max-width: 80px;
      max-height: 80px;
    }
    
    .project-card-title {
      font-size: 1rem;
      margin-bottom: 8px;
    }
    
    .project-card-description {
      font-size: 0.8rem;
      margin-bottom: 10px;
    }
    
    .project-card-tag {
      font-size: 0.75rem;
      padding: 3px 6px;
    }
    
    .project-card-btn-group > .btn {
      font-size: 0.8rem;
      padding: 6px 12px;
    }
  }
  
  @media (max-width: 576px) {
    /* 소형 모바일 */
    .project-card {
      width: 100%;
      max-width: 400px;
      height: 320px; /* 소형 모바일에서도 높이 증가 */
      padding: 12px;
    }
    
    /* 소형 모바일에서 태그 크기 조정 */
    .project-card-tags {
      margin-bottom: 15px;
      min-height: 28px;
    }
    
    .project-card-tag {
      font-size: 0.75rem;
      padding: 3px 6px;
    }
    
    .project-card-actions {
      gap: 6px;
    }
  }
    
    .project-card-image {
      height: 80px;
    }
    
    .project-card-image img {
      max-width: 60px;
      max-height: 60px;
    }
  }
  
  /* Entry 프로젝트 전용 추가 스타일 */
  .entry-project .project-card {
    min-height: 240px; /* Entry 프로젝트 카드 최소 높이 보장 */
  }
  
  /* 버튼 그룹 간격 최적화 */
  .project-card-actions .project-card-btn-group + .project-card-btn-group {
    margin-top: 0; /* 연속된 버튼 그룹의 상단 마진 제거 */
  }
  
  /* 모바일에서 기존 방식 버튼 조정 */
  @media (max-width: 768px) {
    .entry-legacy-btn {
      bottom: 10px;
      right: 10px;
      font-size: 0.7rem;
      padding: 3px 6px;
    }
  }