@charset "utf-8";
/* view.css */
h2 { font-size: 1.2rem; margin-top: 2rem; }
.title { font-size: 1.3rem; font-weight: bold; margin-bottom: 0.5rem; margin-top:0;}
.info { font-size: 0.85rem; color: #666; margin-bottom: 1rem; }
.post-img { width: 100%; height: auto; margin-bottom: 1rem; border-radius: 5px; }
.content { white-space: pre-wrap; margin-bottom: 1rem; line-height: 1.2; }
.attachments ul { list-style: none; padding: 0; margin: 0 0 1rem 0; }
.attachments li { margin-bottom: 0.3rem; }
.attachments a { color: #007bff; text-decoration: none; }
.attachments a:hover { text-decoration: underline; }

/* .container (1200px 제한) */
.container {
    max-width: 1200px;
	overflow: visible !important; /* ⭐ total_common.css 덮어쓰기, 슬라이드에서 정지상태의 이미지를 보이게하기위함이다.  */
}

/* post-info-top 전체를 본문 크기로 */
.post-info-top {
  display: flex;
  align-items: center;
  gap: 1rem;       /* 요소 간 간격 */
  font-size: 1rem;   /* 본문과 동일한 크기 */
  color: #555;       /* 원하시는 색상으로 조절 */
  margin-bottom: 1rem;
  font-weight: bold;
  padding-top: 0.5rem;
}

/* 내부 타입·카테고리도 같은 크기 */
.post-info-top .board-type,
.post-info-top .board-category {
  font-size: inherit;
}
/* post-info-top 전체를 본문 크기로 */


/* 이미지 크기조절 */
.post-img { 
  max-width: 100%; 
  width: auto;
  max-height: 600px;
  height: auto; 
  cursor: pointer;
  display: block;
  margin: 0 auto 1rem;
}

textarea { margin-bottom: 1rem; } 

.btn { display: inline-block; padding: 0.6rem 1rem; background: #007bff; color: white; border: none; border-radius: 5px; text-decoration: none; font-size: 0.9rem; cursor: pointer; }

.btn:hover { background: #0056b3; }

.menu-wrapper { position: absolute; top: 1rem; right: 1rem; }
.menu-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.menu-list { display: none; position: absolute; top: 2rem; right: 0; list-style: none; margin: 0; padding: 0.5rem 0; background: white; border: 1px solid #ccc; border-radius: 5px; z-index: 100; }
.menu-list li a { display: block; padding: 0.4rem 1rem; text-decoration: none; color: #333; font-size: 0.9rem; }
.menu-list li a:hover { background: #f1f1f1; }
.pagination { text-align: center; margin: 1.5rem 0; }
.pagination a, .pagination span { display: inline-block; padding: 0.4rem 0.8rem; margin: 0 0.2rem; text-decoration: none; border: 1px solid #ccc; border-radius: 3px; font-size: 0.9rem; color: #333; }
.pagination .active { background: #007bff; color: white; border-color: #007bff; }
.vote-btn { padding: 0.2rem 0.5rem; margin-right: 0.5rem; background: #eee; border: none; border-radius: 4px; font-size: 0.85rem; cursor: pointer; }
.vote-btn:hover { background: #ddd; }
.likes { margin: 1rem 0; text-align: center; }


.comments { padding: 0; margin: 0; }
.comment { padding: 1rem; border-bottom: 1px solid #eee; display: flex; flex-direction: column; gap: 0.5rem; }
.comment-author { font-weight: bold; font-size: 1rem; color: #333; }
.comment .info { font-size: 0.85rem; color: #777; }
.comments .text { font-size: 0.95rem; line-height: 1.4; white-space: pre-wrap; text-align: left; margin-left: 1rem;}
.comment .actions { display: flex; gap: 0.5rem; }
.comment .actions .vote-btn { background: #eee; border: none; border-radius: 4px; padding: 0.4rem 0.8rem; font-size: 0.9rem; cursor: pointer; }
.comment .actions .vote-btn:hover { background: #ddd; }
.comment-form { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.comment-form textarea { resize: vertical; min-height: 80px; }
.comment-form .btn { align-self: flex-end; background: #007bff; color: white; padding: 0.6rem 1.2rem; border: none; border-radius: 4px; cursor: pointer; }
.comment-form .btn:hover { background: #0056b3; }
@media (max-width: 480px) {
  .wrap { padding: 1rem 0.7rem; }
  .menu-wrapper { top: 0.5rem; right: 0.5rem; }
}
@media (min-width: 768px) {
  .comment { flex-direction: row; align-items: flex-start; }
  .comment-author { flex: 0 0 120px; }
  .comment .info, .comment .text { flex: 1; }
  .comment .actions { flex: 0 0 auto; align-self: center; }
  .comment-form { flex-direction: row; align-items: flex-start; }
  .comment-form textarea { flex: 1; }
  .comment-form .btn { margin-left: 1rem; align-self: center; }
}


/* 좋아요 + 공유 영역 시작 */
.post-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 1.5rem 0;
  position: relative;
}

.post-actions .likes {
  margin: 0;
}

/* 공유 토글 버튼 */
.share-toggle {
  background: #6c757d;
}

.share-toggle:hover {
  background: #5a6268;
}
/* 좋아요 + 공유 영역 끝 */

/* ========================================
   공유 팝업 시작
   ======================================== */
.share-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.share-popup.active {
  display: flex;
}

.share-popup-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 320px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: popupSlide 0.2s ease;
}

@keyframes popupSlide {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.share-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
  font-size: 1.1rem;
}

.share-popup-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.share-popup-close:hover {
  color: #333;
}

.share-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.share-list li {
  border-bottom: 1px solid #f0f0f0;
}

.share-list li:last-child {
  border-bottom: none;
}

.share-list button {
  width: 100%;
  padding: 15px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.share-list button:hover {
  background: #f8f9fa;
}
/* ========================================
   공유 팝업 끝
   ======================================== */



@media (max-width: 480px) {
  .wrap { padding: 1rem 0.7rem; } /* .wrap이 HTML에 없으므로 영향 없음 */
  .menu-wrapper { top: 0.5rem; right: 0.5rem; }
}



/* ========================================
   이미지 슬라이더 스타일 시작
   ======================================== */

/* 1. 슬라이드 전체 래퍼: 크기 고정 및 넘치는 이미지 숨김 (필수!) */
.image-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 768px;  /* 게시글 내용 크기 제한 */
    margin: 0 auto 20px;
    overflow: hidden; /* **필수:** 이 영역 밖의 이미지는 숨김 */
    height: 450px; /* ⭐ 고정 높이 (aspect-ratio 삭제!) */
    border-radius: 5px;
}

/* 2. 슬라이드 트랙: 모든 이미지를 가로로 나열하며 움직이는 영역 */
.slider-track {
    display: flex; 
    height: 100%;
    transition: transform 0.3s ease-in-out; /* ⭐ 0.3초로 수정 */
}

/* 3. 각 슬라이드 아이템: 래퍼의 100% 너비를 정확히 차지하도록 설정 */
.slide-item {
    width: 100%; 
    flex-shrink: 0; /* 크기가 줄어들지 않도록 고정 */
    height: 100%;
    display: flex; /* ⭐ 추가 */
    justify-content: center; /* ⭐ 가로 중앙 정렬 */
    align-items: center; /* ⭐ 세로 중앙 정렬 */
}

/* 4. 이미지 태그: 아이템 내에서 영역을 꽉 채우도록 설정 */
.slide-item img {
    max-width: 100%; /* ⭐ 수정 */
    max-height: 100%; /* ⭐ 수정 */
    width: auto; /* ⭐ 수정 */
    height: auto; /* ⭐ 수정 */
    object-fit: contain; /* 이미지 비율 유지 */
    display: block;
    cursor: pointer;
}

/* 5. 이전/다음 전환 버튼 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5); /* 반투명 배경 */
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.2s;
}

.slider-prev { 
    left: 10px; 
}
.slider-next { 
    right: 10px; 
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* 6. 네비게이션 인디케이터 (점) */
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px; /* 점 사이 간격 */
    z-index: 10;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6); /* 비활성화된 점의 색상 */
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, border 0.3s;
}

/* 현재 활성화된 슬라이드를 나타내는 점 */
.slider-dots .dot.active {
    background: #007bff; /* 메인 버튼 색상과 통일 */
    border: 1px solid #007bff;
}

/* ========================================
   이미지 슬라이더 스타일 끝
   ======================================== */






