@charset "utf-8";

/* ========================================
   아트인태라 - 태라 소식 (물감 팔레트 스타일)
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&display=swap');

:root {
  --terra-orange: #C4704D;
  --terra-orange-light: #E89B7B;
  --charcoal: #2D2D2D;
  --warm-gray: #6B6B6B;
  --cream: #FDF6E3;
  --cream-dark: #F5EFD5;
  --white: #FFFFFF;
  
  /* 수채화 팔레트 색상 */
  --watercolor-pink: #F8E4E1;
  --watercolor-yellow: #FFF4D6;
  --watercolor-mint: #E5F4F0;
  --watercolor-lavender: #EDE8F5;
  --watercolor-peach: #FCEEE8;
  --watercolor-sky: #E8F1F8;
}

/* ========== 게시판 컨테이너 ========== */
#bo_gall {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========== 헤더 영역 ========== */
.board_header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.board_header::before {
  content: '🎨';
  display: block;
  font-size: 40px;
  margin-bottom: 16px;
}

.board_header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.board_header p {
  font-size: 15px;
  color: var(--warm-gray);
  line-height: 1.8;
}

/* 붓터치 장식 */
.brush_deco {
  position: absolute;
  width: 120px;
  height: 8px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--terra-orange) 20%, 
    var(--terra-orange-light) 50%, 
    var(--terra-orange) 80%, 
    transparent 100%
  );
  border-radius: 4px;
  opacity: 0.6;
  left: 50%;
  transform: translateX(-50%);
  bottom: -20px;
}

/* ========== 카테고리 ========== */
#bo_cate {
  margin-bottom: 40px;
  text-align: center;
}

#bo_cate h2 {
  position: absolute;
  left: -9999px;
}

#bo_cate_ul {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 16px 24px;
  margin: 0;
  background: var(--white);
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

#bo_cate_ul li a {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  border-radius: 25px;
  font-size: 14px;
  color: var(--warm-gray);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

#bo_cate_ul li a:hover,
#bo_cate_ul li.bo_cate_on a {
  background: var(--watercolor-peach);
  color: var(--terra-orange);
  font-weight: 600;
}

/* ========== 상단 툴바 ========== */
#bo_btn_top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 16px 24px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

#bo_list_total {
  font-size: 14px;
  color: var(--warm-gray);
}

#bo_list_total span {
  font-weight: 600;
  color: var(--terra-orange);
}

.btn_bo_user {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.btn_bo_user .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--cream);
  border: none;
  border-radius: 12px;
  color: var(--warm-gray);
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn_bo_user .btn:hover {
  background: var(--terra-orange);
  color: var(--white);
  transform: translateY(-2px);
}

.btn_bo_user li {
  position: relative;
}

/* 더보기 드롭다운 */
.more_opt {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 100;
  min-width: 150px;
  list-style: none;
  padding: 8px;
}

.more_opt li button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.2s;
}

.more_opt li button:hover {
  background: var(--cream);
}

/* ========== 전체선택 ========== */
#gall_allchk {
  margin-bottom: 24px;
  padding-left: 8px;
}

.chk_box input[type="checkbox"] {
  display: none;
}

.chk_box label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--warm-gray);
  cursor: pointer;
}

.chk_box label span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--white);
  border: 2px solid #DDD;
  border-radius: 6px;
  transition: all 0.2s;
}

.chk_box input[type="checkbox"]:checked + label span {
  background: var(--terra-orange);
  border-color: var(--terra-orange);
}

.chk_box input[type="checkbox"]:checked + label span::after {
  content: '✓';
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

/* ========== 갤러리 리스트 - 물감 스타일 ========== */
#gall_ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gall_li {
  list-style: none;
}

/* 수채화 카드 배경 - 각각 다른 색상 */
.gall_li:nth-child(6n+1) .gall_box { --card-watercolor: var(--watercolor-pink); }
.gall_li:nth-child(6n+2) .gall_box { --card-watercolor: var(--watercolor-yellow); }
.gall_li:nth-child(6n+3) .gall_box { --card-watercolor: var(--watercolor-mint); }
.gall_li:nth-child(6n+4) .gall_box { --card-watercolor: var(--watercolor-lavender); }
.gall_li:nth-child(6n+5) .gall_box { --card-watercolor: var(--watercolor-peach); }
.gall_li:nth-child(6n+6) .gall_box { --card-watercolor: var(--watercolor-sky); }

.gall_box {
  position: relative;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 수채화 번짐 효과 배경 */
.gall_box::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, var(--card-watercolor) 0%, transparent 70%);
  opacity: 0.8;
  z-index: 0;
  transition: all 0.4s ease;
}

.gall_box::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, var(--card-watercolor) 0%, transparent 70%);
  opacity: 0.5;
  z-index: 0;
}

.gall_box:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.gall_box:hover::before {
  transform: scale(1.2);
  opacity: 1;
}

/* 체크박스 */
.gall_chk {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
}

/* 이미지 영역 */
.gall_img {
  position: relative;
  z-index: 1;
  margin: 16px 16px 0 16px;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--cream);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.gall_img a {
  display: block;
  width: 100%;
  height: 100%;
}

.gall_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gall_box:hover .gall_img img {
  transform: scale(1.08);
}

.gall_img .no_image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 14px;
  color: var(--warm-gray);
  background: 
    linear-gradient(135deg, var(--cream) 25%, transparent 25%),
    linear-gradient(225deg, var(--cream) 25%, transparent 25%),
    linear-gradient(45deg, var(--cream) 25%, transparent 25%),
    linear-gradient(315deg, var(--cream) 25%, transparent 25%),
    var(--cream-dark);
  background-size: 20px 20px;
  background-position: 0 0, 10px 0, 10px -10px, 0 10px;
}

.gall_img .is_notice {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--terra-orange) 0%, var(--terra-orange-light) 100%);
  letter-spacing: 2px;
}

/* 텍스트 영역 */
.gall_con {
  position: relative;
  z-index: 1;
  padding: 20px;
}

.gall_text_href {
  margin-bottom: 16px;
}

.bo_cate_link {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(196, 112, 77, 0.12);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--terra-orange);
  text-decoration: none;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.bo_cate_link:hover {
  background: var(--terra-orange);
  color: var(--white);
}

.bo_tit {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  line-height: 1.5;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s;
}

.bo_tit:hover {
  color: var(--terra-orange);
}

.new_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: var(--white);
  margin-left: 8px;
  vertical-align: middle;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.cnt_cmt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: var(--terra-orange);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  margin-left: 8px;
  vertical-align: middle;
}

.bo_cnt {
  display: block;
  font-size: 13px;
  color: var(--warm-gray);
  line-height: 1.8;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 정보 영역 - 붓터치 구분선 */
.gall_info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  font-size: 12px;
  color: var(--warm-gray);
  position: relative;
}

.gall_info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--card-watercolor) 10%,
    var(--card-watercolor) 90%,
    transparent 100%
  );
  border-radius: 2px;
}

.gall_writer {
  font-weight: 500;
  color: var(--charcoal);
}

.gall_date::before,
.gall_view::before {
  content: '·';
  margin-right: 8px;
  color: #CCC;
}

/* 추천 영역 */
.gall_option {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(0,0,0,0.08);
}

.gall_option strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--warm-gray);
}

/* 빈 리스트 */
.empty_list {
  grid-column: 1 / -1;
  padding: 100px 20px;
  text-align: center;
  font-size: 16px;
  color: var(--warm-gray);
  background: 
    radial-gradient(ellipse at 20% 30%, var(--watercolor-pink) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, var(--watercolor-mint) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, var(--watercolor-yellow) 0%, transparent 60%),
    var(--white);
  border-radius: 24px;
}

.empty_list::before {
  content: '🖼️';
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

/* ========== 페이지네이션 ========== */
.pg_wrap {
  display: flex;
  justify-content: center;
  margin: 50px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: var(--white);
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.pg a,
.pg_current {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  color: var(--warm-gray);
  text-decoration: none;
  transition: all 0.2s;
}

.pg a:hover {
  background: var(--watercolor-peach);
  color: var(--terra-orange);
}

.pg_current {
  background: var(--terra-orange);
  color: var(--white);
  font-weight: 600;
}

/* ========== 하단 버튼 ========== */
.bo_fx {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.bo_fx .btn_bo_user .btn {
  width: auto;
  padding: 0 24px;
  gap: 8px;
  font-size: 14px;
}

/* ========== 검색 모달 ========== */
.bo_sch_wrap {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

.bo_sch_bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 45, 45, 0.6);
  backdrop-filter: blur(4px);
}

.bo_sch {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 440px;
  background: var(--white);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.2);
  z-index: 10;
  /* 수채화 배경 */
  background: 
    radial-gradient(ellipse at 0% 0%, var(--watercolor-pink) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, var(--watercolor-mint) 0%, transparent 50%),
    var(--white);
}

.bo_sch h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 28px;
  text-align: center;
}

.bo_sch h3::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, var(--terra-orange), var(--terra-orange-light));
  border-radius: 2px;
  margin: 12px auto 0;
}

.bo_sch select {
  width: 100%;
  padding: 16px 18px;
  background: var(--white);
  border: 2px solid var(--cream-dark);
  border-radius: 14px;
  font-size: 14px;
  color: var(--charcoal);
  margin-bottom: 12px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  transition: border-color 0.2s;
}

.bo_sch select:focus {
  outline: none;
  border-color: var(--terra-orange);
}

.sch_bar {
  display: flex;
  gap: 10px;
}

.sch_input {
  flex: 1;
  padding: 16px 18px;
  background: var(--white);
  border: 2px solid var(--cream-dark);
  border-radius: 14px;
  font-size: 14px;
  color: var(--charcoal);
  transition: border-color 0.2s;
}

.sch_input:focus {
  outline: none;
  border-color: var(--terra-orange);
}

.sch_input::placeholder {
  color: #AAA;
}

.sch_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  background: var(--terra-orange);
  border: none;
  border-radius: 14px;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.sch_btn:hover {
  background: var(--terra-orange-light);
  transform: scale(1.05);
}

.bo_sch_cls {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--cream);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  color: var(--warm-gray);
  cursor: pointer;
  transition: all 0.2s;
}

.bo_sch_cls:hover {
  background: var(--charcoal);
  color: var(--white);
}

/* ========== 접근성 ========== */
.sound_only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ========== 반응형 ========== */
@media (max-width: 1024px) {
  #gall_ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .board_header h2 {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  #bo_gall {
    padding: 40px 16px;
  }

  .board_header {
    margin-bottom: 36px;
  }

  .board_header h2 {
    font-size: 30px;
  }

  #bo_btn_top {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    text-align: center;
  }

  .btn_bo_user {
    justify-content: center;
  }

  #gall_ul {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gall_box {
    display: flex;
    flex-direction: row;
    border-radius: 20px;
  }

  .gall_box:hover {
    transform: translateY(-4px) rotate(0);
  }

  .gall_img {
    width: 130px;
    min-width: 130px;
    margin: 12px;
    aspect-ratio: 1;
    border-radius: 14px;
  }

  .gall_con {
    flex: 1;
    padding: 16px 16px 16px 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .gall_text_href {
    margin-bottom: 12px;
  }

  .bo_tit {
    font-size: 15px;
  }

  .bo_cnt {
    display: none;
  }

  .gall_info {
    padding-top: 12px;
    font-size: 11px;
    gap: 8px;
  }

  .gall_option {
    display: none;
  }

  .pg a,
  .pg_current {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .bo_sch {
    padding: 32px 24px;
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .board_header::before {
    font-size: 32px;
  }

  .board_header h2 {
    font-size: 26px;
  }

  #bo_cate_ul {
    padding: 12px 16px;
  }

  #bo_cate_ul li a {
    padding: 8px 14px;
    font-size: 13px;
  }

  .gall_img {
    width: 110px;
    min-width: 110px;
  }

  .bo_tit {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .gall_info {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .gall_date::before,
  .gall_view::before {
    display: none;
  }
}

/* ========== 현재 보고있는 게시물 ========== */
.gall_now .gall_box {
  box-shadow: 0 0 0 3px var(--terra-orange);
}

.gall_now .bo_tit {
  color: var(--terra-orange);
}