/* HIRE ME 플랫폼 커스텀 스타일 */

/* 컬러 팔레트 변수 */
:root {
  --navy: #1B365D;
  --teal-blue: #4A90A4;
  --green: #48BB78;
  --orange: #FF7F50;
  --gray: #6B7280;
  --light-gray: #F7FAFC;
  --charcoal: #2D3748;
}

/* 폰트 설정 */
body {
  font-family: 'Noto Sans KR', sans-serif;
  line-height: 1.6;
}

/* 공통 유틸리티 클래스 */
.text-navy { color: var(--navy); }
.text-teal-blue { color: var(--teal-blue); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-charcoal { color: var(--charcoal); }

/* 국기 표시 스타일 */
.flag-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.flag-nepal { background: linear-gradient(45deg, #DC143C, #003893); }
.flag-bangladesh { background: linear-gradient(45deg, #006A4E, #F42A41); }
.flag-srilanka { background: linear-gradient(45deg, #FF9933, #000080, #008000); }
.flag-myanmar { background: linear-gradient(45deg, #FECB00, #34B233, #EA2839); }
.flag-pakistan { background: linear-gradient(45deg, #01411C, #FFFFFF); }
.flag-vietnam { background: linear-gradient(45deg, #DA020E, #FFFF00); }
.flag-uzbekistan { background: linear-gradient(45deg, #0099B5, #FFFFFF, #1EB53A); }

.bg-navy { background-color: var(--navy); }
.bg-teal-blue { background-color: var(--teal-blue); }
.bg-green { background-color: var(--green); }
.bg-orange { background-color: var(--orange); }
.bg-charcoal { background-color: var(--charcoal); }
.bg-light-gray { background-color: var(--light-gray); }

.border-teal-blue { border-color: var(--teal-blue); }
.border-green { border-color: var(--green); }
.border-navy { border-color: var(--navy); }

/* 오렌지 그라데이션 버튼 */
.btn-orange-gradient {
  background: linear-gradient(135deg, #FF7F50, #FF6347);
  color: white;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 127, 80, 0.3);
}

.btn-orange-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 127, 80, 0.4);
}

/* 네이비-틸 그라데이션 배경 */
.bg-navy-teal-gradient {
  background: linear-gradient(135deg, var(--teal-blue), var(--navy));
}

/* 히어로 섹션 배경 */
.hero-bg {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  min-height: 100vh;
}

/* 스크롤 유도 애니메이션 */
.scroll-indicator {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* 카드 호버 효과 */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 성공 케이스 도장 스타일 */
.stamp {
  background: var(--green);
  color: white;
  font-weight: bold;
  font-size: 0.875rem;
  padding: 8px 16px;
  border-radius: 50%;
  transform: rotate(-5deg);
  display: inline-block;
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

/* 별점 스타일 */
.stars {
  color: #FFA500;
  font-size: 1.25rem;
}

/* 폼 스타일 */
.form-container {
  background: white;
  max-width: 800px;
  margin: 120px auto;
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.form-section {
  background: var(--light-gray);
  padding: 32px;
  border-radius: 12px;
  margin: 24px 0;
}

.form-input {
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--teal-blue);
  box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1);
}

.form-textarea {
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--teal-blue);
  box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1);
}

/* 모바일 전용 폼 스타일 */


/* 파일 업로드 스타일 */
.file-upload {
  border: 2px dashed var(--teal-blue);
  background: white;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-upload:hover {
  background: var(--light-gray);
  border-color: var(--navy);
}

/* 모바일에서 파일 업로드 최적화 */
@media (max-width: 768px) {
  .file-upload {
    padding: 20px 16px;
    margin: 8px 0;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .file-upload label {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
  }
  
  .file-upload i {
    margin-bottom: 8px !important;
  }
  
  .file-upload p {
    margin: 4px 0;
    line-height: 1.4;
  }
}

/* 체크박스 스타일 */
.custom-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--teal-blue);
  border-radius: 6px;
  position: relative;
  cursor: pointer;
}

.custom-checkbox input {
  opacity: 0;
  position: absolute;
}

.custom-checkbox input:checked + .checkmark {
  background: var(--teal-blue);
}

.custom-checkbox input:checked + .checkmark:after {
  content: "✓";
  color: white;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 롤링 배너 스타일 */
.candidate-carousel {
  overflow: hidden;
  position: relative;
}

.candidate-track {
  display: flex;
  transition: transform 0.5s ease;
}

.candidate-card {
  flex: 0 0 380px;
  margin-right: 24px;
  background: white;
  border: 2px solid var(--teal-blue);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.candidate-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

/* 네비게이션 버튼 */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 2px solid var(--teal-blue);
  color: var(--teal-blue);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-nav:hover {
  background: var(--teal-blue);
  color: white;
}

.carousel-nav.prev {
  left: -24px;
}

.carousel-nav.next {
  right: -24px;
}

/* 모바일 전용 고정 크기 텍스트 영역 */
.mobile-fixed-textarea {
  width: 250px;
  max-width: 250px;
  min-width: 250px;
  height: 80px;
  padding: 12px;
  margin: 8px auto;
  display: block;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  background: white;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  box-sizing: border-box;
  resize: none;
  overflow: auto;
}

.mobile-fixed-textarea:focus {
  outline: none;
  border-color: #4A90A4;
  box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  /* 전체 페이지 오버플로우 제어 */
  body {
    overflow-x: hidden !important;
  }
  
  .form-container {
    margin: 60px auto;
    padding: 8px !important;
    width: 100% !important;
    max-width: calc(100vw - 16px) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  
  .form-section {
    padding: 12px !important;
    margin: 12px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .form-input, .form-textarea {
    width: 100% !important;
    max-width: calc(100vw - 80px) !important;
    min-width: 0 !important;
    padding: 10px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border: 2px solid #E2E8F0 !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
  }
  
  .form-textarea {
    resize: none;
    min-height: 100px;
  }
  
  /* 그리드 레이아웃 모바일 최적화 */
  .grid.grid-cols-1.md\\:grid-cols-2.gap-6 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* 섹션 내부 여백 조정 */
  .max-w-4xl.mx-auto {
    padding: 0 8px !important;
  }
  
  /* 텍스트 영역 추가 수정 */
  textarea.form-textarea {
    width: calc(100% - 4px) !important;
    max-width: calc(100vw - 88px) !important;
    margin-left: 2px !important;
    margin-right: 2px !important;
  }
  
  /* 모든 space-y 클래스 조정 */
  .space-y-6 > * + * {
    margin-top: 12px !important;
  }
  
  /* 극한의 텍스트 영역 수정 */
  input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea {
    width: 95% !important;
    max-width: 95% !important;
    margin: 0 auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }
  
  /* 모든 기존 스타일 무효화하고 새 스타일 적용 */
  .form-textarea#job-description,
  .form-textarea#additional-request,
  textarea.form-textarea#job-description,
  textarea.form-textarea#additional-request,
  #job-description.form-textarea,
  #additional-request.form-textarea {
    all: unset !important;
    display: block !important;
    width: 260px !important;
    max-width: 260px !important;
    min-width: 260px !important;
    height: 80px !important;
    padding: 12px !important;
    margin: 8px auto !important;
    border: 2px solid #E2E8F0 !important;
    border-radius: 8px !important;
    background: white !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
    box-sizing: border-box !important;
    resize: none !important;
    overflow-wrap: break-word !important;
  }
  
  /* 포커스 스타일도 재정의 */
  .form-textarea#job-description:focus,
  .form-textarea#additional-request:focus,
  textarea.form-textarea#job-description:focus,
  textarea.form-textarea#additional-request:focus {
    outline: none !important;
    border-color: var(--teal-blue) !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1) !important;
  }
  
  /* div 컨테이너 제한 */
  .form-section > .space-y-6, .form-section > div {
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  
  .candidate-card {
    flex: 0 0 320px;
  }
  
  .hero-bg {
    min-height: 80vh;
  }
}

/* 데스크탑에서 특정 텍스트 영역 크기 복원 */
@media (min-width: 769px) {
  textarea#job-description, textarea#additional-request {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 애니메이션 클래스 */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

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

/* 로딩 스피너 */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--teal-blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 알림 메시지 스타일 */
.alert {
  padding: 16px 24px;
  border-radius: 12px;
  margin: 16px 0;
  font-weight: 500;
}

.alert-success {
  background: #F0FFF4;
  border: 2px solid var(--green);
  color: #22543D;
}

.alert-error {
  background: #FED7D7;
  border: 2px solid #E53E3E;
  color: #742A2A;
}

.alert-warning {
  background: #FFFBEB;
  border: 2px solid #D69E2E;
  color: #744210;
}

/* 진행률 바 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-blue), var(--green));
  transition: width 0.3s ease;
}

/* Footer 네이비 배경용 로고 스타일 */
.hireme-logo-navy {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 30px; /* Header 로고와 비슷한 크기로 조정 */
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
  color: #ffffff; /* 흰색 텍스트 */
}

.hireme-logo-navy .exclaim {
  color: #FF7A5C !important; /* 느낌표는 주황색 */
}

.hireme-logo-navy .space {
  width: 0.21em; /* 폰트 크기에 비례하도록 em 단위 사용 */
  display: inline-block;
}

.hireme-logo-navy .globe-svg {
  width: 1.04em; /* 폰트 크기에 비례 */
  height: 1.04em;
  margin-left: 0.15em;
  flex-shrink: 0;
  position: relative;
  top: 0.02em;
}