/***** 커뮤니티 공통 *****/

.main__community {
  width: 100%;
  box-sizing: border-box;
}

.community {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  /* padding: 50px 10%; */
  box-sizing: border-box;
}

.community-title-container {
  height: 289px;
  background-color: #f9fbfd;
  padding: 50px 10%;
}

.community-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 10px;
}

.community-subtitle {
  color: #666;
  margin-bottom: 40px;
  font-size: 20px;
}

/**** 공지사항 ****/

/* 검색창 스타일 */
.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.search-btn {
  padding: 12px 24px;
  background-color: #4b7bf5;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-btn:hover {
  background-color: #3561d3;
}

/* 테이블 스타일 */
.board-table {
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f8f9fa;
  font-weight: bold;
}

td {
  color: #333;
}

/* 링크 스타일 */
td a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

td a:hover {
  color: #4b7bf5;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  text-decoration: none;
  transition: all 0.3s;
}

.page-num:hover {
  background-color: #f8f9fa;
  color: #4b7bf5;
  border-color: #4b7bf5;
}

.page-num.current {
  background-color: #4b7bf5;
  color: white;
  border-color: #4b7bf5;
}

/**** 갤러리 ****/
.gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.gallery-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-5px);
}

.gallery-card a {
  text-decoration: none;
  color: inherit;
}

.card-image {
  width: 100%;
  padding-top: 75%;
  /* 4:3 비율 유지 */
  position: relative;
  background: #f1f1f1;
  overflow: hidden;
}

.card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info {
  padding: 15px;
  background: #fff;
}

.card-title {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
}

.card-date {
  font-size: 14px;
  color: #888;
}

/* 페이지네이션 스타일 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  text-decoration: none;
  transition: all 0.3s;
}

.page-num:hover {
  background-color: #f8f9fa;
  color: #4b7bf5;
  border-color: #4b7bf5;
}

.page-num.current {
  background-color: #4b7bf5;
  color: white;
  border-color: #4b7bf5;
}

/**** faq ****/

.faq {
  max-width: 1200px;
  margin: 0 auto;
  /* padding: 20px; */
}

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

.faq-item {
  width: 100%;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.toggle-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  font-size: 24px;
  font-weight: bold;
  transition: transform 0.3s ease;
  color: #3c3c3c;
}

/* active 상태일 때 + 를  로 변경 */
.faq-item.active .toggle-icon {
  transform: rotate(45deg);
}

.faq-question:hover {
  background: #f8f9fa;
}

.arrow-icon::before,
.arrow-icon::after {
  content: '';
  position: absolute;
  background: #666;
  transition: all 0.3s ease;
}

.arrow-icon::before {
  width: 2px;
  height: 10px;
  top: 5px;
  right: 9px;
}

.arrow-icon::after {
  width: 10px;
  height: 2px;
  top: 9px;
  right: 5px;
}

.faq-answer {
  /* max-height 속성 제거 */
  display: none;
  /* 추가 */
  background: #f8f9fa;
}

/* transition 속성도 제거 가능 */

.faq-answer p {
  padding: 20px;
  margin: 0;
  color: #666;
  line-height: 1.6;
  font-size: 16px;
}

/* 활성화된 상태 */
.faq-item.active .faq-question {
  background: #f8f9fa;
  color: #4b7bf5;
}

.faq-item.active .arrow-icon::before {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* 페이지네이션 스타일 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  text-decoration: none;
  transition: all 0.3s;
}

.page-num:hover {
  background-color: #f8f9fa;
  color: #4b7bf5;
  border-color: #4b7bf5;
}

.page-num.current {
  background-color: #4b7bf5;
  color: white;
  border-color: #4b7bf5;
}

/****** 문의하기 *****/
.contact-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.required {
  color: #ff0000;
  margin-left: 4px;
}

input[type='text'],
input[type='email'],
input[type='tel'],
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

textarea {
  min-height: 200px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #4b7bf5;
}

/* 문의하기 로딩 화면 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #666;
  opacity: 80%;
  z-index: 1000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.loader-container {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 90%;
  max-width: 400px;
}

.loader {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
}

.envelope {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  animation: pulse 1.5s infinite;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  animation: spin 1s linear infinite;
}

.status-message {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #333;
}

.loading-dots {
  display: inline-block;
  width: 20px;
  text-align: left;
}

/* 애니메이션 */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* 메일 전송 완료 페이지 */
.main__contact-complete {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 200px 0;
}

.completion-container {
  background: white;
  padding: 3rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 90%;
  max-width: 500px;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.success-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #2ecc71;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checkmark {
  animation: checkmark 0.8s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes checkmark {
  0% {
    stroke-dashoffset: 100;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

.title {
  color: #2ecc71;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.message {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.sub-message {
  color: #888;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 6px;
}

.home-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
}

.home-button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.home-button:active {
  transform: translateY(0);
}

/* 홈 아이콘 스타일 */
.home-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* 체크박스 커스텀 스타일 */
.consent-check {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
}

.checkbox-label input[type='checkbox'] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-label input[type='checkbox']:checked+.checkbox-custom {
  background: #4b7bf5;
  border-color: #4b7bf5;
}

.checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s;
}

.checkbox-label input[type='checkbox']:checked+.checkbox-custom::after {
  opacity: 1;
}

.label-text {
  font-size: 15px;
  color: #333;
}

.consent-description {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* 제출 버튼 */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: #4b7bf5;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background: #3561d3;
}

/***** 공지사항 게시글 *****/
.notice-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;

  .detail-admin {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
  }
}

.page-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-subtitle {
  color: #666;
  margin-bottom: 40px;
}

.detail-container {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

/* 게시글 헤더 */
.post-header {
  padding: 24px;
  border-bottom: 1px solid #eee;
  position: relative;
}

.post-title {
  font-size: 20px;
  color: #333;
  margin-bottom: 10px;
}

.post-date {
  color: #888;
  font-size: 14px;
}

/* 게시글 내용 */
.post-content {
  padding: 40px 24px;
  min-height: 300px;
  line-height: 1.8;
  color: #333;
}

/* 버튼 영역 */
.button-area {
  padding: 24px;
  border-top: 1px solid #eee;
  text-align: center;
}

.list-button {
  display: inline-block;
  padding: 12px 40px;
  background-color: #4b7bf5;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 15px;
  transition: background-color 0.3s;
}

.list-button:hover {
  background-color: #3561d3;
}

/* 추가 효과 */
.detail-container {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-content a {
  color: #4b7bf5;
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

/* 공통 모바일 메뉴 스타일 (태블릿 & 모바일) */
@media (max-width: 1279px) {
  .community-title-container {
    height: 180px;
    padding: 40px 10%;
  }

  .community-title {
    font-size: 24px;
  }

  .community-subtitle {
    font-size: 14px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-date {
    font-size: 13px;
  }

  .page-num {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .search-btn {
    width: 70px;
    height: 40px;
  }

  .notice-title {
    font-size: 24px;
  }

  th,
  td {
    padding: 12px 8px;
    font-size: 14px;
  }

  /* 번호 열 숨기기 */
  th:first-child,
  td:first-child {
    display: none;
  }

  .page-num {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .page-title {
    font-size: 22px;
  }

  .post-header {
    padding: 16px;
  }

  .post-title {
    font-size: 16px;
  }

  .post-content {
    padding: 20px 16px;
    font-size: 14px;
  }

  .list-button {
    width: 100%;
    padding: 12px 0;
  }

  .notice-detail {
    padding: 20px;
  }

  .page-title {
    font-size: 24px;
  }

  .post-header {
    padding: 20px;
  }

  .post-title {
    font-size: 18px;
  }

  .post-content {
    padding: 30px 20px;
    font-size: 15px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* iOS 스무스 스크롤 */
  }

  .contact-form {
    padding: 20px;
  }

  input[type='text'],
  input[type='email'],
  input[type='tel'],
  textarea {
    font-size: 15px;
  }

  .consent-check {
    padding: 15px;
  }

  .label-text {
    font-size: 14px;
  }

  .consent-description {
    font-size: 13px;
  }

  .submit-btn {
    padding: 14px;
    font-size: 15px;
  }

  .faq-question {
    font-size: 15px;
    padding: 15px;
  }

  .faq-answer p {
    font-size: 14px;
    padding: 15px;
  }

  .page-num {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* 태블릿 전용 스타일 */
@media (max-width: 1279px) and (min-width: 769px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* 모바일 전용 스타일 */
@media (max-width: 768px) {
  .search-btn {
    padding: 12px;
  }
}