/* =============================================== */
/* 💻 Contact Form 기본 스타일 (PC 기준)         */
/* =============================================== */

#contact {
  padding: 5rem 1rem;
  background-color: #f9fafb; /* 섹션 배경색 */
  display: flex;
  flex-direction: column;
  align-items: center;
}

#contact h2 {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #111827;
  font-weight: 600;
}

.contact-form {
  width: 100%;
  max-width: 600px; /* 폼 최대 너비 설정 */
  background-color: #ffffff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

/* input과 textarea 공통 스타일 */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  color: #374151;
  background-color: #f9fafb;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
  color: #9ca3af;
}

/* 입력 필드 포커스 효과 */
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.contact-form textarea {
  resize: vertical; /* 세로 크기만 조절 가능하도록 설정 */
  min-height: 120px;
}

/* 제출 버튼 스타일 */
.submit-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background-color: #4f46e5; /* 메인 색상 */
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease;
}

.submit-btn:hover {
  background-color: #4338ca; /* 호버 시 약간 더 어두운 색 */
}

.submit-btn:active {
  transform: scale(0.98); /* 클릭 시 살짝 작아지는 효과 */
}

/* 상태 메시지 스타일 */
.status-message {
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.status-message.success {
  background-color: #d1fae5; /* 성공 메시지 배경색 */
  color: #065f46; /* 성공 메시지 글자색 */
}

.status-message.error {
  background-color: #fee2e2; /* 에러 메시지 배경색 */
  color: #991b1b; /* 에러 메시지 글자색 */
}

/* 웹 접근성을 위한 스크린 리더 전용 클래스 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =============================================== */
/* 📱 모바일 반응형 스타일 (768px 이하)           */
/* =============================================== */
@media (max-width: 768px) {
  #contact {
    padding: 4rem 1rem;
  }

  #contact h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
  }

  .contact-form {
    padding: 1.5rem;
  }
}