/*━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━*
 *                여행 포토 후기
 *━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━*/
/* 기본 단위: 1rem = 16px 기준 */

/* 전체 컨테이너: 최대 너비와 좌우 여백 조정 */
.community-hot-list {
  margin-top: 4rem; /* 캐러셀 바로 아래에 4rem 여백 추가 */
}

.title-more {
  display: flex;
  align-items: center;
  text-align: center;
  margin-left: 2.5rem !important;
  margin-right: 2.5rem !important;
}

/* Title 영역 */
.hot-title {
  color: #333333;
  font-size: 2.25rem; /* 36px */
  font-family: "Pretendard", sans-serif;
  font-weight: 600;
  word-wrap: break-word;
  margin-right: 1.5rem; /* 오른쪽 여백을 추가 */
}

.hot-subtitle {
  color: #5c5c5c;
  font-size: 1.5rem; /* 24px */
  font-family: "Pretendard", sans-serif;
  font-weight: 600;
  word-wrap: break-word;
  margin: 0;
}

.more-link {
  color: #5c5c5c;
  font-size: 1.5rem; /* 24px */
  font-family: "Pretendard", sans-serif;
  font-weight: 600;
  word-wrap: break-word;
}

/* Card Set: 중앙 정렬 및 카드 사이 간격 */
.card-set {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4rem; /* 카드 간 간격 rem */
}

/* Hot Card */
.hot-card {
  width: 16rem; /* 256px = 16rem */
  display: flex;
  flex-direction: column;
  gap: 1.1875rem; /* 19px ≒ 1.1875rem */
  margin-bottom: 2rem;
}

/* Card Image */
.card-image {
  width: 100%;
  height: 20rem; /* 320px = 20rem */
  border-radius: 0.9375rem; /* 15px ≒ 0.9375rem */
  object-fit: cover;
}

/* Card Description */
.card-desc {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* 12px = 0.75rem */
}

/* Card Title */
.card-title {
  width: 100%;
  text-align: center;
  color: #333333;
  font-size: 1.5rem; /* 24px */
  font-family: "Pretendard", sans-serif;
  font-weight: 600;
  word-wrap: break-word;
}

/* Profile Description */
.profile-desc {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Profile */
.profile {
  display: flex;
  align-items: flex-end;
  gap: 0.625rem; /* 10px = 0.625rem */
}

/* Profile Image */
.profile-img {
  width: 1.25rem; /* 20px = 1.25rem */
  height: 1.25rem;
  border-radius: 50%;
  object-fit: cover;
}

/* Nickname & Date */
.nickname,
.date {
  color: #5c5c5c;
  font-size: 1.125rem; /* 18px = 1.125rem */
  font-family: "Pretendard", sans-serif;
  font-weight: 500;
  word-wrap: break-word;
}

/* 반응형: 모바일 화면에서 전체 축소 */
@media (max-width: 821px) {
  .community-hot-list {
    padding: 0 1rem;
  }
  /* 카드 셋은 flex에서 그리드로 변경 */
  .card-set {
    display: grid;
    /* 최소 카드 너비 14rem, 여유 공간에 따라 자동 조정되도록 */
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    justify-items: center;
  }
  /* hot-card는 grid 항목으로 100% 너비 사용 */
  .hot-card {
    width: 100%;
    margin-bottom: 1.5rem;
  }
  .title-line,
  .subtitle-line {
    display: block;
  }

  .hot-title {
    font-size: 2rem; /* 축소된 폰트 크기 */
  }
  .hot-subtitle,
  .more-link {
    font-size: 1.25rem;
  }
  .card-title {
    font-size: 1.375rem;
  }
  .nickname,
  .date {
    font-size: 1rem;
  }
  .card-image {
    height: 18rem;
  }
}

/* 🟡 배나낭에서 소통해요 섹션 */
.community-section {
  width: 100%;
  padding: 64px 136px;
  background: #fefefe;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 타이틀 스타일 */
.community-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.community-title {
  font-size: 36px;
  font-weight: 600;
  color: #333;
}

.community-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: #5c5c5c;
}

/* 컨텐츠 랩퍼 */
.community-content {
  display: flex;
  gap: 27px;
  justify-content: space-between; /* 왼쪽은 게시글 리스트, 오른쪽은 유저 정보 */
  align-items: flex-start; /* 상단 정렬 */
}

/* 📝 게시글 리스트 */
.post-list {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-card {
  display: flex;
  align-items: center;
  padding: 20px 32px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #c4c4c4;
  gap: 20px;
  margin-bottom: 20px;
}

.post-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-title {
  font-size: 24px;
  font-weight: 500;
  color: #333;
}

.post-description {
  font-size: 18px;
  font-weight: 500;
  color: #5c5c5c;
}

.post-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 30px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.author-name {
  font-size: 18px;
  font-weight: 500;
  color: #5c5c5c;
}

.post-date {
  font-size: 18px;
  font-weight: 500;
  color: #5c5c5c;
}

.post-image {
  width: 160px;
  height: 160px;
  border-radius: 10px;
}

.posts-photo-card {
  cursor: pointer;
}

.post-list-curser {
  cursor: pointer;
}
.post-card:hover {
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.25); /* 더 강한 그림자 */
  transform: scale(1.02); /* 약간 확대 효과 */
}
.card-image:hover {
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.25); /* 더 강한 그림자 */
  transform: scale(1.02); /* 약간 확대 효과 */
}

/* 🟡 유저 정보 및 글쓰기 버튼 */
.community-sidebar {
  width: 300px; /* 고정된 너비 */
  min-width: 300px; /* 최소 너비 */
  max-width: 300px; /* 최대 너비 */
  height: auto; /* 높이는 자동 */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #c4c4c4;
  gap: 30px;
}

.user-avatar {
  width: 150px;
  height: 150px;
}

.user-name {
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.write-button {
  padding: 10px 38px;
  background: #ffd700;
  border-radius: 10px;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  border: none;
  cursor: pointer;
}

.write-button:hover {
  background: #e6c200;
}

/* 🌀 로딩 스피너 컨테이너 (게시글 리스트 공간 차지) */
.spinner-container {
  width: 100%;
  height: 100px; /* 로딩 시 차지할 높이 (조정 가능) */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0; /* 위아래 여백 */
  position: relative;
}

/* 🌀 로딩 스피너 스타일 (더 크게 & 중앙 정렬) */
.spinner {
  width: 60px; /* 기존보다 더 큼 */
  height: 60px;
  border: 6px solid #ffd700; /* 바깥쪽 원 */
  border-top: 6px solid transparent; /* 투명 부분 */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute; /* 부모 기준 정렬 */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* 🌀 로딩 애니메이션 */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* <!-- **************************************************** -->
    <!-- ★★★★★  여기부터 게시물 디테일 섹션 ★★★★★ -->
    <!-- **************************************************** --> */

#post-detail-image {
  max-width: 100%; /* 부모 요소 크기에 맞게 자동 조정 */
  max-height: 400px; /* 최대 높이를 제한 (원하는 크기로 조정 가능) */
  display: block; /* 이미지가 있으면 정상적으로 표시 */
  margin: 20px auto; /* 가운데 정렬 */
  border-radius: 10px; /* 모서리를 둥글게 (선택 사항) */
  object-fit: cover; /* 이미지 비율을 유지하면서 크롭 */
  text-align: center;
}

/* 📝 게시물 스타일 */
.post-detail-nav {
  margin-bottom: 50px;
  display: flex; /* 가로 정렬 */
  align-items: center; /* 수직 정렬 */
  gap: 8px; /* 요소 사이 간격 */
  font-size: 16px;
  color: #666;
}

#a-community {
  all: unset; /* 기본 스타일 제거 */
  color: #d4af37;
  margin-left: 30px;
  text-decoration: underline;
  font-weight: bold;
  cursor: pointer;
}

.breadcrumb-divider {
  color: black; /* 구분자 색상 */
}

#post-detail-title-breadcrumb {
  color: #333; /* 제목 색상 */
  font-weight: normal;
}

.detail-loading-container {
  text-align: center;
  margin: 3% 10%;
}

.post-detail-full-container {
  margin: 0 20%;
  margin-bottom: 10%;
}

.post-detail-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777;
  font-size: 14px;
  margin-bottom: 10px;
}

.post-detail-author-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
#post-detail-title {
  font-size: 40px;
}

.detail-author-name {
  font-weight: bold;
  font-size: 20px;
}

.detail-post-date {
  margin-left: 30px;
  font-size: 20px;
}

#post-detail-content {
  margin: 3% 0;
  font-size: 20px;
}

.post-detail-image {
  max-width: 100%;
  max-height: 400px;
  margin: 20px 0;
  border-radius: 10px;
  object-fit: cover;
}

/* 💬 댓글 스타일 */
#comments-detail-container {
  margin-top: 20px;
}

.comment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
}

.detail-comment-profile-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 10px;
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-weight: bold;
  margin-bottom: 5px;
}

.comment-date {
  font-size: 12px;
  color: #888;
}

/* 📝 댓글 입력창 스타일 */
.detail-comment-input-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 50px;
}

.comment-input-area {
  display: flex;
  flex-direction: column; /* 닉네임 + 입력창 수직 정렬 */
  gap: 5px;
  width: 100%;
}

.comment-nickname {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

#comment-detail-input {
  flex: 1;
  width: 100%;
  min-height: 50px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  resize: none;
}

.submit-comment {
  width: 10%;
  background: #ffcc00;
  color: #333;
  border: none;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  margin-left: auto; /* 오른쪽 끝으로 이동 */
  display: block; /* 혹은 flex 부모 내에서 유지 */
}

.submit-comment:hover {
  background: #ffb700;
}

/* ====== 글쓰기 페이지 ========= */
#post-create-form {
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  border-radius: 8px;
  gap: 30px;
  border: 1.5px solid #b9b8b8;
}

#post-create-content {
  width: 100%;
  height: 500px;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ffffff;
  border-radius: 5px;
  font-size: 16px;
}

/* 📌 버튼 스타일 */
.submit-create-button {
  width: 100%;
  padding: 12px;
  background-color: #ffcc00;
  color: #333;
  border: none;
  font-size: 18px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

/* 제목 입력 필드 스타일 */
.title-input {
  width: 100%;
  font-size: 35px;
  font-weight: bold;
  text-align: left;
  border: none;
  outline: none;
  padding: 10px;
  background: transparent;
  color: black;
  margin-bottom: 30px;
}

/* 입력하지 않았을 때 기본 스타일 */
.title-input::placeholder {
  color: #595656; /* 흐린 색상 */
  font-weight: normal;
}

/* 이미지 업로드 버튼 */
.upload-button {
  display: inline-block;
  background-color: #797875;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

/* 이미지 미리보기 */
.image-preview-container {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.image-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview .delete-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 2px 5px;
  border-radius: 50%;
  cursor: pointer;
}
