/* 서둔교회 앱 기본 스타일 */

* {
  box-sizing: border-box;
  /* 전체 맑은고딕 폰트 적용 - 네이버 기준 */
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif !important;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  color: #1f2937;
  overflow-x: hidden;
  max-width: 100vw;
}

/* 기본 버튼 스타일 */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 기본 입력 필드 스타일 */
input, select, textarea {
  font-family: inherit;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 모달 스타일 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

/* 그리드 레이아웃 */
.grid {
  display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* 플렉스 레이아웃 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* 간격 */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-2 { padding-top: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.gap-3 { gap: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.text-center { text-align: center; }

.m-2 { margin: 0.5rem; }
.m-4 { margin: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

/* 색상 */
.bg-white { background-color: white; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-red-600 { background-color: #dc2626; }
.bg-green-600 { background-color: #16a34a; }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }
.bg-black\/70 { background-color: rgba(0, 0, 0, 0.7); }
.bg-black\/90 { background-color: rgba(0, 0, 0, 0.9); }
.hover\:bg-black\/70:hover { background-color: rgba(0, 0, 0, 0.7); }
.hover\:bg-black\/90:hover { background-color: rgba(0, 0, 0, 0.9); }

.text-white { color: white; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-red-600 { color: #dc2626; }
.text-green-600 { color: #16a34a; }

/* ============================================
   폰트 크기 - 네이버 기준으로 통일
   모든 페이지에서 이 설정을 사용해야 함
   ============================================ */
:root {
  /* 네이버 기준 폰트 크기 */
  --font-xs: 0.75rem;     /* 12px - 작은 부가정보, 캡션 */
  --font-sm: 0.875rem;    /* 14px - 본문, 설명 */
  --font-base: 1rem;      /* 16px - 카드 제목, 중요 텍스트 */
  --font-lg: 1.125rem;    /* 18px - 섹션 제목 */
  --font-xl: 1.25rem;     /* 20px - 페이지 제목 */
  --font-2xl: 1.5rem;     /* 24px - 대형 제목 */

  /* 네이버 기준 색상 변수 */
  --primary: #03C75A;
  --primary-dark: #02B350;
  --primary-light: #E8F7EF;
  --secondary: #2B3B6D;
  --secondary-dark: #1A2C52;
  --gray-900: #212121;
  --gray-700: #616161;
  --gray-600: #757575;
  --gray-500: #9E9E9E;
  --gray-200: #EEEEEE;
  --gray-100: #F5F5F5;
  --gray-50: #FAFAFA;
}

/* 기본 폰트 크기 설정 */
body {
  font-size: var(--font-sm);
  line-height: 1.6;
}

/* 텍스트 크기 클래스 */
.text-xs {
  font-size: var(--font-xs);
  line-height: 1.4;
}

.text-sm {
  font-size: var(--font-sm);
  line-height: 1.5;
}

.text-base {
  font-size: var(--font-base);
  line-height: 1.6;
}

.text-lg {
  font-size: var(--font-lg);
  line-height: 1.75;
}

.text-xl {
  font-size: var(--font-xl);
  line-height: 1.75;
}

.text-2xl {
  font-size: var(--font-2xl);
  line-height: 1.8;
}

/* 폰트 두께 */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* 기본 요소 스타일 */
h1 { font-size: var(--font-2xl); font-weight: 700; }
h2 { font-size: var(--font-xl); font-weight: 700; }
h3 { font-size: var(--font-lg); font-weight: 600; }
h4 { font-size: var(--font-base); font-weight: 600; }
p { font-size: var(--font-sm); }

/* 카드 스타일 - 네이버 기준 */
.naver-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
}

.naver-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* 카드 제목 */
.card-title {
  font-size: var(--font-base);
  font-weight: 600;
  line-height: 1.5;
}

/* 카드 설명 */
.card-description {
  font-size: var(--font-sm);
  line-height: 1.5;
  color: #6b7280;
}

/* 테두리 */
.border { border-width: 1px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* 위치 */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.top-4 { top: 1rem; }
.left-4 { left: 1rem; }
.right-4 { right: 1rem; }
.top-1\/2 { top: 50%; }
.transform { transform: translateZ(0); }
.-translate-y-1\/2 { transform: translateY(-50%); }

/* 크기 */
.w-full { width: 100%; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-full { height: 100%; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-32 { height: 8rem; }
.h-48 { height: 12rem; }
.h-64 { height: 16rem; }
.h-auto { height: auto; }
.max-h-\[90vh\] { max-height: 90vh; }
.max-w-4xl { max-width: 56rem; }

/* 여백 */
.mb-20 { margin-bottom: 5rem; }

/* 숨김/표시 */
.hidden { display: none; }
.block { display: block; }

/* 오버플로우 */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* 애니메이션 */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* 호버 효과 */
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }

/* 전환 효과 */
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-duration: 150ms; }

/* 모바일 스타일 레이아웃 */
.max-w-md {
  max-width: 28rem; /* 모바일 폰 크기 */
  margin: 0 auto; /* 가운데 정렬 */
}

/* 모바일 전용 표시 */
.mobile-only {
  display: block;
}

/* 반응형 - 모바일 우선 */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobile-only {
    display: none;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
