/* 커스텀 스타일 */
body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 한국어 텍스트 어절 단위 줄바꿈 */
body, p, div, span, h1, h2, h3, h4, h5, h6, li, td, th, label, button {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

/* 본문 텍스트 최적화 */
p {
  text-align: left;
  margin-bottom: 1rem;
}

/* 리스트 아이템 */
li {
  text-align: left;
  margin-bottom: 0.5rem;
}

/* 제목과 중요한 텍스트는 더 여유있는 line-height */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.7;
}

/* 긴 텍스트 블록 최적화 - 한글 최적화 */
.text-content {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.8;
  text-align: left;
  letter-spacing: -0.02em;
  word-spacing: 0.05em;
}

/* 제목이나 짧은 텍스트는 가운데 정렬 */
.text-center .text-content {
  text-align: center;
}

/* 긴 본문 텍스트는 왼쪽 정렬로 가독성 향상 */
.text-body {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.8;
  text-align: left;
  letter-spacing: -0.01em;
  max-width: none;
}

/* 설명문이나 부제목 */
.text-description {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.7;
  text-align: left;
  letter-spacing: -0.01em;
  color: #6b7280;
}

/* 카드나 박스 내부 텍스트 */
.text-card {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.6;
  text-align: left;
  letter-spacing: -0.005em;
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 애니메이션 */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* 새로운 애니메이션 클래스들 */
.animate-fade-in-up {
  animation: fadeInUp 1s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-delay-1 {
  animation: float 3s ease-in-out infinite;
  animation-delay: 1s;
}

.animate-float-delay-2 {
  animation: float 3s ease-in-out infinite;
  animation-delay: 2s;
}

.animate-spin-slow {
  animation: spin 8s linear infinite;
}

.animate-reverse-spin-slow {
  animation: reverseSpin 10s linear infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite alternate;
}

.animate-gradient {
  animation: gradientShift 3s ease-in-out infinite;
}

/* 키프레임 정의 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateY(5px) rotate(-1deg);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes reverseSpin {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  100% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
  }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 추가 호버 효과 */
.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

/* 그라디언트 텍스트 애니메이션 */
.gradient-text-animate {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}

/* 카드 전환 효과 개선 */
.card-transform {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-transform:hover {
  transform: translateY(-8px) scale(1.02);
}

/* 배경 패턴 애니메이션 */
.bg-pattern-animate {
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  background-size: 200px 200px;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% {
    background-position: 0% 0%, 0% 0%;
  }
  100% {
    background-position: 200px 200px, -200px -200px;
  }
}

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

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 반응형 네비게이션 */
@media (max-width: 768px) {
  .mobile-menu {
    display: block;
  }
  
  .desktop-menu {
    display: none;
  }
}

@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }
  
  .desktop-menu {
    display: flex;
  }
}

/* 그라디언트 배경 */
.gradient-bg {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

/* 버튼 스타일 */
.btn-primary {
  background: linear-gradient(45deg, #1e40af, #3b82f6);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #1d4ed8, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* 카드 그림자 효과 */
.card-shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 드롭다운 메뉴 스타일 */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  color: #374151;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

.dropdown-content a:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.dropdown-content a:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* 드롭다운 화살표 애니메이션 */
.dropdown .fa-chevron-down {
  transition: transform 0.3s ease;
}

.dropdown:hover .fa-chevron-down {
  transform: rotate(180deg);
}

/* 모바일에서 드롭다운 비활성화 */
@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background-color: transparent;
  }
  
  /* 모바일에서 텍스트 최적화 */
  .text-body {
    font-size: 0.95rem;
    line-height: 1.7;
    letter-spacing: -0.005em;
  }
  
  .text-card {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  .text-description {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  /* 모바일에서 여백 조정 */
  p {
    margin-bottom: 0.8rem;
  }
  
  /* 긴 텍스트 블록 여백 조정 */
  .text-body {
    margin-bottom: 1rem;
  }
}

/* 태블릿 크기에서 최적화 */
@media (min-width: 769px) and (max-width: 1024px) {
  .text-body {
    font-size: 0.98rem;
    line-height: 1.75;
  }
}