.search {
  font-family: pretendard;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nav a {
  color: #111;
}

.logo img {
  width: auto;
  margin-bottom: 4px;
  margin-left: -3px;
  margin-right: 0;
  height: 30px;
}

.lang-btn {
  color: #111;
}

.search-btn {
  color: #111;
}

.search-main {
  margin-top: 85px;
  flex: 1;
  padding: 0px 240px;
}

.search-header {
  margin: 60px 0;
}

.search-button {
  border: none;
  background-color: transparent;
  padding: unset;
  cursor: pointer;
}

/* 검색 타이틀 */
.search-title {
  font-family: pretendard;
  font-weight: 600;
  font-size: 67px;
  line-height: 140%;
  letter-spacing: -2%;
  display: flex;
  gap: 20px;
  margin-bottom: 100px;
}

.search-keyward {
  color: #e3181b;
}

/* 검색 네비게이션 */
.search-nav {
  display: flex;
  gap: 2rem;
  margin-bottom: 60px;
}

.search-tab {
  text-decoration: none;
  font-size: 24px;
  color: #cccccc;
  font-weight: 500;
  position: relative;
  padding-bottom: 11px;
  border-bottom: 4px solid transparent;
}

.search-button.search-tab.active {
  border-bottom: 4px solid #e3181b;
  color: #e3181b;
}

/* 총 검색량 */
.search-total-count {
  font-weight: 600;
  font-size: 14px;
  margin: 0px;
  margin-bottom: 20px;
}

/* 카드를 누리면 이동하게 하는 a 태그 */
.search-card-link {
  cursor: pointer;
  display: block;
}

/* 카드를 감싸는 요소 */
.search-card {
  position: relative;
  padding: 0px 30px;
  width: 100%;
  background-color: #fff;
  display: flex;
  align-items: center;
  gap: 60px;
  border-bottom: 1px solid #f1f1f1;
}

/* 마지막 요소를 제외하고 border-bottom 적용 */
.search-card:not(:last-child) {
  border-bottom: 1px solid #333333;
}

/* hover 시 빨간 막대가 생기게 하는 요소 */
.search-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 0;
  background-color: transparent;
  transition:
    height 0.2s ease,
    background-color 0.2s ease;
}

/* 카드 왼쪽 */
.search-card-left {
  flex: 1;
  position: relative;
  min-width: 0px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 59.5px 0;
}

/* hover 시 left 우상단에 보이는 장식 */
.search-card-left:after {
  content: "";
  position: absolute;
  right: 0px;
  top: 0px;
  width: 17px;
  height: 17px;
  background: url(./../assets/icons/point-red.svg) no-repeat;
  background-size: cover;
  opacity: 0;
}

/* 카테고리 */
.search-card-category {
  color: #111111;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  background-color: #f9f9f9;
  border-radius: 999px;
  width: fit-content;
  transition: all 0.2s ease;
  margin: 0;
}

/* 상세 내용 */
.search-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 카드 내 타이틀 */
.search-card-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #666666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* force 1 line */
  transition: all 0.2s ease;
}

/* 카드 내 내용 */
.search-card-desc {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: #444444;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* number of lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-card-desc a:visited {
  color: #666666;
}

/* 카드 추가 정보 */
.search-card-meta {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  text-align: end;
  display: flex;
  justify-content: end;
  gap: 16px;
}

/* 카드 타입 (blog or case-study) */
.search-card-type {
  color: red;
}

.search-card-right {
  padding: 42.5px 0;
}

/* 카드 오른쪽 이미지 */
.search-card-right img {
  width: 215px;
  height: 215px;
  object-fit: cover;
}

/* 검색 결과가 없는 경우 */
.search-result-empty {
  border-top: #e3181b 4px solid;
  text-align: center;
  padding: 50px 0px;
  margin: 0;
  font-size: 24px;
  color: #111111;
}

/* hover 시 스타일 변경 */
.search-card:hover {
  background-color: #f9f9f9;
}

.search-card:hover::before {
  height: 5px;
  background-color: #e3181b;
}

.search-card:hover .search-card-category {
  color: #e3181b;
  background-color: #fce8e8;
}

.search-card:hover .search-card-title {
  color: #e3181b;
}

.search-card:hover .polygon-icon {
  display: none;
}

.search-card:hover .polygon-icon-red {
  display: block;
}

.search-card-left:hover:after {
  opacity: 1;
}

/* 패이지네이션 */
#search-pagination {
  width: 100%;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  justify-content: center;
  margin: 30px 0px 100px;
}

.page-btn {
  background-color: transparent;
  border: none;
  padding: 16px;
  font-size: 18px;
  cursor: pointer;
  width: 50px;
  height: 50px;
}

.page-btn.active {
  background: red;
  color: white;
  font-weight: 700;
  pointer-events: none;
  cursor: pointer;
}

.page-icon {
  cursor: pointer;
  opacity: 0.8;
  padding: 0;
}

.page-icon:hover {
  opacity: 1;
}

.page-icon.disabled {
  opacity: 0.7;
  pointer-events: none;
  cursor: default;
}

@media (max-width: 1440px) {
  .search {
    margin-top: 85px;
  }

  .search-main {
    margin: 0;
    padding: 0 40px;
  }

  .search-title {
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .gnb {
    border-bottom: 1px solid #ebebeb;
  }

  .logo img {
    width: 120px;
    margin-bottom: 4px;
    margin-left: -3px;
    margin-right: 0;
    height: 22px;
  }

  .search {
    padding: 60px 20px;
    padding-top: 30px;
  }

  .search-main {
    padding: 0 20px;
  }

  .search-header {
    display: none;
  }

  .search-title {
    font-size: 30px;
    margin-bottom: 30px;
  }

  .search-nav {
    gap: 1rem;
    margin-bottom: 30px;
  }

  .search-tab {
    font-size: 18px;
  }

  .search-card {
    padding: 20px 10px;
  }

  .search-card-left {
    padding: 0;
    margin: 20px 0;
  }

  .search-card-right {
    padding: 0;
  }

  .search-card-meta-date-prefix {
    display: none;
  }

  .search-card-meta-update {
    display: none;
  }

  /* 카드를 감싸는 요소 */
  .search-card {
    position: relative;
    padding: 20px 10px 20px;
    width: 100%;
    background-color: #fff;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #f1f1f1;
  }

  /* 카드 왼쪽 */
  .search-card-left {
    flex: 1;
    position: relative;
    min-width: 0px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* hover 시 left 우상단에 보이는 장식 */
  .search-card-left:after {
    content: "";
    position: absolute;
    right: 0px;
    top: 0px;
    width: 17px;
    height: 17px;
    background: url(./../assets/icons/point-red.svg) no-repeat;
    background-size: cover;
    opacity: 0;
  }

  /* 카테고리 */
  .search-card-category {
    color: #111111;
    font-size: 8px;
    font-weight: 600;
    padding: 4px 12px;
    background-color: #f9f9f9;
    border-radius: 999px;
    width: fit-content;
    transition: all 0.2s ease;
    margin: 0;
  }

  /* 상세 내용 */
  .search-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* 카드 내 타이틀 */
  .search-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #666666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* force 1 line */
    transition: all 0.2s ease;
  }

  /* 카드 내 내용 */
  .search-card-desc {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: #444444;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 카드 추가 정보 */
  .search-card-meta {
    font-size: 10px;
    justify-content: start;
  }

  /* 카드 오른쪽 이미지 */
  .search-card-right img {
    width: 100px;
    height: 100px;
    object-fit: cover;
  }

  .pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0px 60px;
  }

  .page-btn {
    background-color: transparent;
    border: none;
    padding: 10px;
    font-size: 14px;
    width: 35px;
    height: 35px;
  }

  .page-icon {
    padding: 0;
  }
  .page-btn img {
    width: 35px;
    height: 35px;
  }

}
