/* cases.css - 그리드 레이아웃 추가 */

/* 공통 스타일 (모바일 기준: 425px 이하) */
.cases-container {
  width: 100%;
  padding: 40px 0;
  background-color: #f9f9f9;
}

/* 탭 메뉴 */
.cases-tabs {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-btn {
  flex: 1;
  background-color: #fff;
  border: none;
  padding: 12px 0;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  border-right: 1px solid #eee;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn:hover {
  text-decoration: none;
}

.tab-btn:last-child {
  border-right: none;
}

.tab-btn.active {
  background-color: #468534;
  color: white;
  font-weight: 500;
}

/* 케이스 목록 - 그리드 레이아웃 */
.cases-list {
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.case-item {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%;
}

.case-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.case-item:hover .case-image img {
  transform: scale(1.05);
}

.case-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.case-department {
  display: inline-block;
  color: #468534;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
}

.case-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.5;
}

.case-desc {
  font-size: 14px;
  color: #777;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex-grow: 1;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  margin: 40px 0 20px;
}

.page-nav, .page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0 3px;
  border: 1px solid #ddd;
  background-color: #fff;
  color: #777;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.page-number.active {
  background-color: #468534;
  border-color: #468534;
  color: white;
  font-weight: 500;
}

.page-nav:hover, .page-number:hover {
  background-color: #f5f5f5;
}

/* 검색 기능 */
.search-container {
  margin: 30px 0;
}

.search-box {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background-color: #fff;
}

.search-category {
  min-width: 80px;
  padding: 0 10px;
  border: none;
  border-right: 1px solid #ddd;
  background-color: #f9f9f9;
  font-size: 14px;
  color: #555;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.search-input {
  flex: 1;
  padding: 10px 15px;
  border: none;
  font-size: 14px;
  color: #333;
}

.search-button {
  background-color: #333;
  color: white;
  border: none;
  padding: 0 15px;
  cursor: pointer;
}
/* 생활백서용 추가 스타일 */
.case-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.case-title a:hover {
  color: #468534;
}

.case-meta {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.case-date {
  font-size: 13px;
  color: #999;
  font-weight: 500;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #777;
}

.no-results p {
  font-size: 16px;
  margin: 0;
}

/* 검색 폼 스타일 개선 */
.search-box {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-button {
  background-color: #468534;
  transition: background-color 0.3s ease;
}

.search-button:hover {
  background-color: #3a6e2a;
}

/* 카드 호버 효과 개선 */
.case-item {
  cursor: pointer;
  transition: all 0.3s ease;
}

.case-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* 태블릿에서 메타 정보 스타일 */
@media (min-width: 768px) {
  .case-meta {
    padding-top: 20px;
  }
  
  .case-date {
    font-size: 14px;
  }
  
  .no-results {
    padding: 80px 20px;
  }
  
  .no-results p {
    font-size: 18px;
  }
}

/* 태블릿 버전 (768px 이상) - 2열 그리드 */
@media (min-width: 768px) {
  .cases-container {
    padding: 60px 0;
  }
  
  .tab-btn {
    font-size: 16px;
    padding: 15px 0;
  }
  
  /* 2열 그리드로 변경 */
  .cases-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .case-image {
    height: 180px;
  }
  
  .case-content {
    padding: 25px;
  }
  
  .case-department {
    font-size: 15px;
  }
  
  .case-title {
    font-size: 18px;
  }
  
  .case-desc {
    font-size: 15px;
  }
  
  .page-nav, .page-number {
    width: 40px;
    height: 40px;
    margin: 0 4px;
  }
  
  .search-category {
    min-width: 100px;
  }
  
  .search-input {
    padding: 12px 15px;
  }
    .case-meta {
    padding-top: 20px;
  }
  
  .case-date {
    font-size: 14px;
  }
  
  .no-results {
    padding: 80px 20px;
  }
  
  .no-results p {
    font-size: 18px;
  }
}

/* PC 버전 (1024px 이상) - 3열 그리드 */
@media (min-width: 1024px) {
    .case-meta {
    padding-top: 20px;
  }
  
  .case-date {
    font-size: 14px;
  }
  
  .no-results {
    padding: 100px 20px;
  }
  
  .no-results p {
    font-size: 20px;
  }
  .cases-container {
    padding: 80px 0;
  }
  
  .cases-tabs {
    max-width: 600px;
    margin: 0 auto 40px;
  }
  
  .tab-btn {
    font-size: 17px;
    padding: 18px 0;
  }
  
  /* 3열 그리드로 변경 */
  .cases-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  
  .case-image {
    height: 200px;
  }
  
  .case-department {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  .case-title {
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .case-desc {
    font-size: 15px;
    -webkit-line-clamp: 3;
  }
  
  .pagination {
    margin: 50px 0 30px;
  }
  
  .page-nav, .page-number {
    width: 45px;
    height: 45px;
    font-size: 15px;
  }
  
  .search-container {
    max-width: 600px;
    margin: 40px auto;
  }
  
  .search-category {
    min-width: 120px;
    font-size: 15px;
  }
  
  .search-input {
    padding: 15px 20px;
    font-size: 15px;
  }
  
  .search-button {
    padding: 0 20px;
  }
}