/* 커뮤니티 페이지 전용 스타일 */
.community-section {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: calc(100vh - 200px);
}

.community-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.community-header__content {
  flex: 1;
}

.community-title {
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
  margin: 10px 0 12px 0;
  letter-spacing: -0.6px;
  line-height: 1.25;
}

.community-description {
  font-size: 15px;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.community-write-btn {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
}

.community-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

.community-search {
  flex: 1;
  position: relative;
  max-width: 400px;
}

.community-search__input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font-size: 14px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.community-search__input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.community-search__btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.community-search__btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.community-sort {
  flex-shrink: 0;
}

.community-sort__select {
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font-size: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.community-sort__select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 게시글 카드 리스트 */
.community-section .board {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  padding: 8px 0;
}

.community-section .board__list {
  display: block;
  list-style: none;
  padding: 0;
  margin: 0;
}

.community-section .board__item {
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: none;
  padding: 18px 24px;
  cursor: pointer;
  transition: background-color 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}

.community-section .board__item:hover {
  transform: none;
  background: #f8fafc;
}

.community-section .board__item:last-child {
  border-bottom: none;
}

.board__item-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 2px;
}

.board__item-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.board__item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
  width: 100%;
}

.board__item-author {
  font-weight: 600;
  color: #374151;
}

.board__item-date {
  color: #9ca3af;
}

.board__item-comments {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
}

.board__item-preview {
  font-size: 15px;
  color: #475569;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.board__empty,
.board__loading {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
  font-size: 15px;
  grid-column: 1 / -1;
}

.community-pagination {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* 글 상세 페이지 스타일 */
.post-detail-header {
  margin-bottom: 24px;
}

.post-back-btn {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  padding: 10px 16px;
}

.post-detail-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 0 20px;
  max-width: 980px;
  margin: 0 auto 24px;
  box-shadow: none;
}

.post-detail__header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.post-detail__header-content {
  flex: 1;
}

.post-detail__title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.post-detail__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #64748b;
  flex-wrap: wrap;
}

.post-meta__author {
  font-weight: 600;
  color: #374151;
}

.post-meta__date,
.post-meta__views,
.post-meta__comments {
  color: #9ca3af;
}

.post-action-btn {
  flex-shrink: 0;
  min-width: 58px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-edit-btn {
  color: #334155;
}

.post-delete-btn {
  color: #ef4444;
}

.post-content__text {
  font-size: 16px;
  line-height: 1.8;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-detail__content {
  padding-left: 12px;
  padding-right: 12px;
}

/* 댓글 섹션 */
.comments-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 32px;
  margin-top: 24px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.comments-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.comments-section__title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.comments-section__count {
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.comments-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-size: 15px;
}

/* 댓글 카드 */
.comment-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s;
}

.comment-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.comment-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.comment-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.comment-card__author {
  font-weight: 600;
  color: #374151;
}

.comment-card__date {
  color: #9ca3af;
}

.comment-card__actions {
  display: flex;
  gap: 8px;
}

.comment-action-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.comment-action-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.comment-delete-btn:hover {
  background: #fef2f2;
  color: #ef4444;
}

.comment-card__content {
  font-size: 15px;
  line-height: 1.7;
  color: #111827;
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-card__footer {
  margin-top: 12px;
}

.comment-reply-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.comment-reply-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

/* 답글 */
.comment-replies {
  margin-top: 16px;
  padding-left: 24px;
  border-left: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.reply-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.reply-card__author {
  font-weight: 600;
  color: #374151;
}

.reply-card__date {
  color: #9ca3af;
}

.reply-card__content {
  font-size: 14px;
  line-height: 1.6;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 댓글 입력 폼 */
.comment-form {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.comment-form__label {
  margin-bottom: 12px;
}

.comment-form__label label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.comment-form__hint {
  font-size: 13px;
  color: #9ca3af;
}

.comment-form__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form__textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  transition: all 0.2s;
}

.comment-form__textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-form__actions {
  display: flex;
  justify-content: flex-end;
}

.comment-submit-btn {
  padding: 12px 24px;
  font-weight: 600;
}

.reply-form {
  margin-top: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.reply-form-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-text {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.reply-text:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.reply-form__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* 반응형 */
@media (max-width: 768px) {
  .community-header {
    flex-direction: column;
    align-items: stretch;
  }

  .community-write-btn {
    width: 100%;
    justify-content: center;
  }

  .community-toolbar {
    flex-direction: column;
  }

  .community-search {
    max-width: 100%;
  }

  .community-section .board__item {
    padding: 14px 16px;
  }

  .post-detail-card {
    padding: 6px 0 16px;
  }

  .post-detail__header-top {
    flex-direction: column;
    padding-left: 8px;
    padding-right: 8px;
  }

  .post-detail__content {
    padding-left: 8px;
    padding-right: 8px;
  }

  .post-action-btn {
    min-width: 56px;
    height: 30px;
    font-size: 12px;
    padding: 0 8px;
    justify-content: center;
  }

  .comments-section {
    padding: 20px;
  }

  .comment-replies {
    padding-left: 16px;
  }
}

/* 사이트 소개 및 인사말 페이지 카드 스타일 */
.about-section,
.greeting-section {
  background: #f7f9fc;
  min-height: calc(100vh - 200px);
}

.about-header,
.greeting-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.about-header h2,
.greeting-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 8px 0 0 0;
  letter-spacing: -0.5px;
}

.about-cards-grid,
.greeting-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.about-card,
.greeting-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.about-card:hover,
.greeting-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.about-card p,
.greeting-card p {
  font-size: 15px;
  line-height: 1.8;
  color: #111827;
  margin: 0;
}

.about-card h3,
.greeting-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px 0;
}

.about-card--section {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}

.about-card--section h3 {
  color: #0369a1;
  margin-bottom: 12px;
}

.about-card--highlight,
.greeting-card--highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fcd34d;
}

.about-card--highlight p,
.greeting-card--highlight p {
  font-weight: 600;
  color: #92400e;
}

@media (max-width: 768px) {
  .about-cards-grid,
  .greeting-cards-grid {
    grid-template-columns: 1fr;
  }

  .about-card--section {
    grid-column: 1;
  }
}

/* 커뮤니티 허브 — 게시판 바로가기 카드 */
.community-hub-section .community-header--hub {
  border-bottom: none;
  margin-bottom: 16px;
  padding-bottom: 0;
}

.community-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 4px 32px;
}

.community-hub__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 20px 22px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.community-hub__card:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.community-hub__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 12px;
}

.community-hub__name {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.community-hub__desc {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.45;
}

@media (max-width: 480px) {
  .community-hub__grid {
    grid-template-columns: 1fr;
  }
}