@charset "utf-8";

.hompage .tab-menu {
  padding-bottom: 50px;
}

.tab-menu ul {
  width: 100%;
  max-width: 400px;
  margin: 50px 0 20px 0;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  /* 기본 리스트 스타일 제거 */
  padding: 0;
  /* 기본 패딩 제거 */
}

.tab-menu li {
  width: 50%;
  /* li 요소의 너비를 50%로 설정 */
  box-sizing: border-box;
  /* 패딩과 보더가 너비에 포함되도록 */
}

.tab-menu a {
  display: block;
  /* a 태그를 블록 레벨 요소로 변경 */
  text-align: center;
  padding: 15px 0;
  border-right: 1px solid #ddd;
  background: #efefef;
  color: #000;
  text-decoration: none;
  /* 링크 밑줄 제거 */
}

.tab-menu li:last-child a {
  border-right: 0;
  /* 마지막 요소의 오른쪽 보더 제거 */
}

.tab-menu .on a {
  background: #ff4200;
  color: #fff;
}

@media all and (max-width: 576px) {
  .tab-menu li {
    width: 100%; /* 모바일에서는 전체 너비 사용 */
  }

  .tab-menu a {
    border-top: 1px solid #ddd; /* 탭 위에 상단 보더 추가 */
    border-right: 0; /* 오른쪽 보더 제거 */
  }
}


.hompage .content-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  margin: 0 auto;
}

.hompage .grid {
  flex-basis: calc(25% - 30px);
  margin-right: 40px;
  margin-bottom: 40px;
  position: relative;
}

.hompage .grid:not(:nth-child(4n))::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #ccc;
}

.hompage .grid:nth-child(4n) {
  margin-right: 0;
}

.hompage .grid:last-child::after {
  display: none;
}

.hompage .grid .photo img {
  display: inline-block;
  width: 100%;
  height: 205px;
  overflow: hidden;
  object-fit: cover;
}

.hompage .grid .txt {
  line-height: 1.5;
  word-break: keep-all;
}

.hompage .grid .txt h2 {
  line-height: 1.5;
  font-size: 18px;
}

.hompage .grid .txt h2 a {
  font-size: 18px;
  font-weight: 400;
  text-align: left;
  color: #000;
}

.hompage .grid .txt p {
  font-size: 17px;
  color: #555;
  font-weight: 400;
  margin-top: 20px;
}

.hompage .grid .category {
  font-size: 14px;
  color: #ed1c24;
  text-decoration: none;
  margin-top: 5px;
}

#bo_cate_ul {
  display: flex;
  list-style: none;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0 0 50px 0;
  max-width: 1000px;
}

#bo_cate_ul li {
  flex: 1;
  text-align: center;
  border-right: 1px solid #ddd;
}

#bo_cate_ul li:last-child {
  border-right: none;
}

#bo_cate_ul li a {
  display: block;
  padding: 5px 0;
  color: #333;
  text-decoration: none;
  font-size: calc(10px + 0.3vw);
  max-width: 100%;
  /* 최대 너비 설정 */
}

#bo_cate_ul li a.on {
  color: #2998d4;
  font-weight: 600;
}

/* 페이지 네이션 */

.ts2 ul {
  display: flex;
  margin-top: 50px;
}
.ts2 ul li {
  width: 30px;
  height: 30px;
  width: 50%;
}
.ts2 ul li a {
  display: block;
  font-size: 15px;
  width: 30px;
  height: 30px;
  text-align: center;
  color: #333;
}
.ts2 ul li a.on {
  display: inline-block;
  background: #3a8afd;
  border: 1px solid #3a8afd;
  color: #fff;
  font-weight: bold;
  height: 30px;
  line-height: 30px;
  padding: 0 10px;
  min-width: 30px;
  border-radius: 3px;
}

@media screen and (max-width: 768px) {
  .hompage .grid {
    flex-basis: calc(50% - 10px);
    margin-right: 20px;
    position: relative;
  }

  .hompage .grid:nth-child(even) {
    margin-right: 0;
  }

  .hompage .grid:not(:nth-child(4n))::after {
    right: -10px;
  }

  #bo_cate_ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    /* 항목들을 왼쪽에서부터 정렬 */
  }

  #bo_cate_ul li {
    flex: 0 0 50%;
    /* 각 항목의 너비를 부모의 50%로 설정하여 2개씩 나열 */
    display: flex;
    justify-content: center;
    /* 내부 링크(a 태그)를 중앙 정렬 */
  }

  #bo_cate_ul li a {
    font-size: calc(12px + 0.5vw);
    /* 768px 이상에서의 글자 크기 증가 */
  }
}
@media screen and (max-width: 640px) {
  .hompage .grid {
    flex-basis: 100%;
    margin: 10px 0;
  }
  .hompage .grid:not(:nth-child(4n))::after {
    display: none;
  }
}
