/* =====================================
   YBS COMMUNITY
   커뮤니티 전용 디자인
===================================== */

.community-container {
  width: min(1050px, calc(100% - 40px));
  margin: 55px auto 70px;
}

/* 상단 소개 영역 */

.community-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 42px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 25px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.88),
    rgba(229, 239, 255, 0.76)
  );
  box-shadow: 0 15px 45px rgba(49, 88, 151, 0.08);
}

.community-hero::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -65px;
  top: -85px;
  border-radius: 50%;
  background: rgba(100, 149, 237, 0.12);
  pointer-events: none;
}

.community-eyebrow {
  display: inline-block;
  margin-bottom: 15px;
  color: #3568d4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.community-hero h1 {
  margin-bottom: 12px;
  color: #17233c;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -1.5px;
}

.community-hero p {
  color: #718096;
  font-size: 14px;
  line-height: 1.8;
}

.community-status {
  display: inline-flex;
  align-items: center;
  margin-top: 22px;
  padding: 9px 14px;
  border: 1px solid rgba(53, 104, 212, 0.12);
  border-radius: 30px;
  background: rgba(53, 104, 212, 0.07);
  color: #3568d4;
  font-size: 12px;
  font-weight: 700;
}

/* 기본 패널 */

.community-panel {
  padding: 30px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 35px rgba(49, 88, 151, 0.06);
  backdrop-filter: blur(15px);
}

.community-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.community-label {
  display: block;
  margin-bottom: 8px;
  color: #6488ce;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.community-heading h2 {
  margin-bottom: 7px;
  color: #17233c;
  font-size: 21px;
  font-weight: 800;
}

.community-heading p {
  color: #8793a6;
  font-size: 12px;
  line-height: 1.6;
}

/* 버튼 */

.secondary-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border: 0;
  border-radius: 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.secondary-button {
  flex-shrink: 0;
  border: 1px solid #dce6f6;
  background: white;
  color: #52627c;
}

.secondary-button:hover {
  border-color: #9bb7ec;
  background: #f4f7ff;
}

.primary-button {
  background: #3568d4;
  color: white;
}

.primary-button:hover {
  background: #244a9c;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 게시글 목록 */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.community-empty {
  padding: 38px 20px;
  border: 1px dashed #d8e2f1;
  border-radius: 15px;
  background: rgba(247, 250, 255, 0.7);
  color: #8995a8;
  font-size: 13px;
  text-align: center;
}

/* 게시글 카드 */

.post-card {
  padding: 23px;
  border: 1px solid #e5ecf7;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  border-color: #cbdaf3;
  box-shadow: 0 8px 22px rgba(49, 88, 151, 0.06);
}

.post-card h3 {
  margin-bottom: 12px;
  color: #1c2b45;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.post-content {
  color: #52627c;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid #edf1f7;
  color: #98a3b4;
  font-size: 11px;
}

/* 좋아요 / 싫어요 */

.reaction-area {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.reaction-button {
  padding: 8px 13px;
  border: 1px solid #e1e8f3;
  border-radius: 20px;
  background: #f8faff;
  color: #65748c;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.reaction-button:hover {
  border-color: #a9c1ed;
  background: #eef4ff;
}

.reaction-button.active {
  border-color: #9bb7ec;
  background: #eaf1ff;
  color: #3568d4;
}

/* 댓글 */

.comment-section {
  margin-top: 21px;
  padding-top: 18px;
  border-top: 1px solid #edf1f7;
}

.comment-section h4 {
  margin-bottom: 13px;
  color: #34435e;
  font-size: 13px;
  font-weight: 800;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  position: relative;
  padding: 13px 14px;
  border-radius: 11px;
  background: #f5f8fd;
}

.comment-text {
  color: #4c5b73;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-meta {
  margin-top: 7px;
  color: #9aa5b5;
  font-size: 10px;
}

.comment-item .delete-button {
  margin-top: 8px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  margin-top: 14px;
}

.comment-form textarea {
  width: 100%;
  min-height: 75px;
  padding: 12px 14px;
  border: 1px solid #dce6f6;
  border-radius: 11px;
  background: white;
  color: #17233c;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  outline: none;
  resize: vertical;
}

.comment-form textarea:focus {
  border-color: #7da3e9;
  box-shadow: 0 0 0 3px rgba(53, 104, 212, 0.08);
}

.comment-form .primary-button {
  padding: 9px 15px;
}

/* 댓글 삭제 버튼 */

.delete-button {
  padding: 6px 11px;
  border: 1px solid #f0d6d6;
  border-radius: 8px;
  background: #fff0f0;
  color: #bd5555;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* 하단 */

.community-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 5px;
  color: #98a3b4;
  font-size: 11px;
}

.community-footer a {
  color: #6488ce;
  font-weight: 700;
  text-decoration: none;
}

.community-footer a:hover {
  text-decoration: underline;
}

/* 반응형 */

@media (max-width: 700px) {
  .community-container {
    width: min(100% - 28px, 1050px);
    margin-top: 28px;
  }

  .community-hero {
    padding: 34px 24px;
  }

  .community-panel {
    padding: 22px 18px;
  }

  .community-heading {
    align-items: flex-start;
  }

  .community-heading h2 {
    font-size: 18px;
  }

  .post-card {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .community-heading {
    flex-direction: column;
  }

  .secondary-button {
    width: 100%;
  }

  .community-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* 관리자 공개 게시글 삭제 영역 */

.post-delete-area {
  margin-left: auto;
}

.post-delete-area .delete-button {
  padding: 7px 12px;
  font-size: 11px;
}

@media (max-width: 480px) {
  .post-delete-area {
    width: 100%;
    margin-left: 0;
  }
}