/* BASIC fonts [Pretendard Variable] - cdnjs cdn */
@import url("https://cdnjs.cloudflare.com/ajax/libs/pretendard/1.3.9/variable/pretendardvariable.min.css");

.visual__sub h2 {
  font-family: "Pretendard", sans-serif;
}

.cert {
  padding: 150px 0 80px;
}

.cert .title {
  font-family: 'Paperozi', sans-serif;
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.3;
}

/* list.skin.php */
.list__wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.list__item {
  min-width: 0;
  border: 1px solid #bfbfbf;
  transition: all .3s;
  cursor: pointer;
}

.list__item:hover {
  background: #f4f4f4;
}

.list__item figure {
  height: 350px;
  overflow: hidden;
}

.list__item figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: all .3s;
}

.list__item:hover figure img {
  transform: scale(1.05);
}

.list__meta {
  padding: 20px;
}

.list__meta__title {
  color: #231815;
  font-size: 1.375rem;
  line-height: 1.4;
  font-weight: 700;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.4em * 2);
  word-break: break-word;
  overflow-wrap: anywhere;
  margin-bottom: 16px;
}

.list__meta__desc {
  color: #9b9b9b;
  font-size: 1.125rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 16px;
}

.list__meta__date {
  color: #383838;
  font-size: 1rem;
  font-weight: 600;
}

.board__empty {
  grid-column: 1 / -1;
  padding: 100px 0;
  text-align: center;
  color: #9b9b9b;
  font-size: 1.25rem;
  border: 1px dashed #ddd;
  border-radius: 8px;
  background-color: #fafafa;
  margin: 40px 0;
}

/* 3. 글쓰기 폼 (Write) */
.write__form {
  width: 100%;
}

.write__row {
  margin-bottom: 30px;
  border-bottom: 1px solid #e9e9e9;
  padding-bottom: 20px;
}

.write__row label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #000;
}

.write__row input[type="text"],
.write__row select {
  width: 100%;
  border: none;
  padding: 5px 0;
  font-size: 1.15rem;
  background: transparent;
  outline: none;
  font-weight: 500;
}

.write__row .help {
  margin-top: 10px;
  font-size: 12px;
  color: #aaa;
}

/* 4. 상세보기 (View) */
.view__wrap {
  border-top: 1px solid #eee;
  margin-top: 20px;
}

.view__head {
  padding: 20px 0;
  border-bottom: 1px solid #f2f2f2;
}

.view__cate {
  display: block;
  font-size: 13px;
  color: #9b9b9b;
  font-weight: 700;
  margin-bottom: 8px;
}

.view__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #231815;
  letter-spacing: -0.5px;
}

.view__meta {
  font-size: 13px;
  color: #bbb;
}

.view__meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 10px;
  background: #eee;
  margin: 0 12px;
}

/* 다운로드 영역 (버튼식) */
.view__download-wrap {
  padding: 20px 0;
  border-bottom: 1px solid #f2f2f2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: #f8f8f8;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  text-decoration: none;
  transition: 0.2s;
}

.btn-download:hover {
  background: #231815;
  border-color: #231815;
}

.dw-name {
  font-size: 14px;
  color: #444;
  font-weight: 500;
}

.dw-count {
  font-size: 12px;
  color: #999;
  margin-left: 8px;
}

.btn-download:hover .dw-name {
  color: #fff;
}

.btn-download:hover .dw-count {
  color: rgba(255, 255, 255, 0.5);
}

/* 본문 */
.view__body {
  padding: 50px 0 0;
}

.view__thumb {
  width: 800px;
  margin: 0 auto;
  margin-bottom: 20px;
}

.view__thumb img {
  width: 100%;
  height: auto;
  border: 1px solid #eee;
}

.view__content {
  line-height: 1.8;
  font-size: 1.1rem;
  color: #333;
}

/* 5. 페이지네이션 및 하단 버튼 통합 (Foot) */
.board__bottom {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 60px;
}

/* 페이지네이션 스타일 */
.board__bottom .paginate {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.board__bottom .paginate a,
.board__bottom .paginate strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  color: #666;
  transition: 0.2s;
  border-radius: 4px;
  text-decoration: none;
}

.board__bottom .paginate strong {
  background: #231815;
  color: #fff;
  border-color: #231815;
  font-weight: 600;
}

.board__bottom .paginate a {
  transform: none !important;
  transition: background-color 0.2s, color 0.2s !important;
}

.board__bottom .paginate a:hover {
  background-color: #f4f4f4;
}

/* 글쓰기/수정/삭제 등 액션 버튼 위치 */
.board__bottom .actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}

/* 버튼 공통 규격 */
.board__bottom .btn-line,
.board__bottom .btn-fill,
.board__bottom .btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  height: 50px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  box-sizing: border-box;
}

.board__bottom .btn-line {
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
}

.board__bottom .btn-line:hover {
  background: #f9f9f9;
  border-color: #bbb;
}

.board__bottom .btn-fill {
  background: #231815;
  color: #fff;
  border: 1px solid #231815;
}

.board__bottom .btn-fill:hover {
  background: #444;
  border-color: #444;
}

.board__bottom .btn-red {
  border: 1px solid #ff4848;
  background: #fff;
  color: #ff4848;
}

.board__bottom .btn-red:hover {
  background: #ffd0d0;
  border-color: #ff8686;
}

/* --- 반응형 코드 시작 --- */

/* 1440px 이하: 넓은 화면 대응 */
@media screen and (max-width: 1440px) {
  .cert {
    padding: 120px 0 60px;
  }

  .list__wrap {
    gap: 24px;
  }

  .list__item figure {
    height: 300px;
  }
}

/* 1280px 이하: 데스크탑/태블릿 가로 모드 */
@media screen and (max-width: 1280px) {
  .list__wrap {
    grid-template-columns: repeat(3, 1fr);
  }

  .cert .title {
    font-size: 3rem;
  }

  .view__thumb {
    width: 100%;
  }
}

/* 1024px 이하: 태블릿 일반 */
@media screen and (max-width: 1024px) {
  .list__wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .cert .title {
    font-size: 2.5rem;
  }

  .view__title {
    font-size: 1.75rem;
  }
}

/* 768px 이하: 태블릿 세로 및 대형 모바일 */
@media screen and (max-width: 768px) {
  .cert {
    padding: 80px 0 40px;
  }

  .cert .title {
    font-size: 2rem;
  }

  .list__wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .list__item figure {
    height: 250px;
  }

  .list__meta {
    padding: 15px;
  }

  .list__meta__title {
    font-size: 1.15rem;
    margin-bottom: 10px;
  }

  .view__title {
    font-size: 1.5rem;
  }

  .view__meta span:not(:last-child)::after {
    margin: 0 8px;
  }

  .board__bottom {
    margin-top: 30px;
  }

  .board__bottom .actions {
    justify-content: center;
    margin-top: 20px;
    order: 2;
  }

  .board__bottom .btn-line,
  .board__bottom .btn-fill,
  .board__bottom .btn-red {
    flex: 1;
    padding: 0 15px;
    height: 45px;
  }
}

/* 480px 이하: 모바일 최적화 */
@media screen and (max-width: 480px) {
  .cert .title {
    font-size: 1.75rem;
  }

  /* 리스트 1열로 변경 */
  .list__wrap {
    grid-template-columns: 1fr;
  }

  .list__item figure {
    height: 220px;
  }

  .view__title {
    font-size: 1.25rem;
    line-height: 1.4;
  }

  .view__meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .view__meta span:not(:last-child)::after {
    display: none;
  }

  .btn-download {
    width: 100%;
    justify-content: space-between;
  }

  .board__bottom .paginate a,
  .board__bottom .paginate strong {
    width: 35px;
    height: 35px;
    font-size: 0.85rem;
  }

  .write__row input[type="text"],
  .write__row select {
    font-size: 1rem;
  }
}