/* =========================================
   네추럴 힐링 - 공통 스타일시트
   NHHC Clinical Branding: Deep Green + Warm Ivory
   VERSION: 3.0 - Clinical Branding Redesign
   LAST UPDATE: 2025-01-02
   Concept: Calm, Clinical, Organic - Modern Medical Boutique
   ========================================= */

/* 전역 변수 - NHHC Clinical Branding */
:root {
  /* Brand Colors */
  --primary-green: #004225;        /* Deep Forest Green - 신뢰, 안정, 의료적 전문성 */
  --primary-dark: #002818;         /* Darker variant */
  --primary-light: #006B3D;        /* Lighter variant */
  --secondary-ivory: #F6F3E7;      /* Warm Ivory - 고급스럽고 깨끗한 인상 */
  --accent-sage: #B9CBB3;          /* Light Sage - hover, 라인구분 */
  
  /* Text Colors */
  --text-dark: #1A1A1A;
  --text-gray: #666666;
  --text-light: #999999;
  
  /* Background Colors */
  --bg-white: #FFFFFF;
  --bg-ivory: #F6F3E7;
  --bg-light: #FAFAF8;
  
  /* Utility Colors */
  --border-gray: #E0E0E0;
  --border-sage: #B9CBB3;
  --success-green: #006B3D;
  --warning-orange: #FF9900;
  --error-red: #DC3545;
  
  --font-primary: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-en: 'Open Sans', 'Pretendard', sans-serif;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
  
  --transition: all 0.3s ease;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* 리셋 & 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 타이포그래피 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-gray);
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 레이아웃 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-white {
  background-color: var(--bg-white);
}

.section-gray {
  background-color: var(--bg-gray);
}

/* 글로벌 네비게이션 */
.global-header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-gray);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: grid;
  grid-template-columns: 300px 1fr auto;
  align-items: center;
  padding: 1rem 20px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 3rem;
}

.logo {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
  max-width: 300px !important;
  overflow: hidden !important;
  position: relative !important;
}

.logo:hover,
.logo:focus {
  border: none;
  outline: none;
  text-decoration: none;
}

.logo-image {
  height: 60px;
  width: auto;
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  mix-blend-mode: multiply;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.1 !important;
  gap: 0.2rem !important;
  white-space: nowrap !important;
  overflow: visible !important;
  position: static !important;
  float: none !important;
}

.logo-text-main {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: var(--primary-green) !important;
  letter-spacing: -0.5px !important;
  font-family: 'Inter', var(--font-primary) !important;
  line-height: 1.2 !important;
  position: static !important;
  float: none !important;
}

.logo-text-sub {
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  color: var(--primary-green) !important;
  letter-spacing: 0.5px !important;
  opacity: 0.7 !important;
  line-height: 1 !important;
  position: static !important;
  float: none !important;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.main-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.main-nav a {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.main-nav a i {
  font-size: 1.25rem;
  color: var(--primary-green);
  opacity: 0.8;
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--primary-green);
}

.main-nav a:hover i {
  opacity: 1;
  transform: translateY(-2px);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-green);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a.active i {
  opacity: 1;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: var(--bg-gray);
  border-radius: var(--radius-sm);
}

.lang-switch button {
  padding: 0.25rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-gray);
  cursor: pointer;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.lang-switch button.active {
  background-color: var(--primary-green);
  color: white;
}

.lang-switch button:hover:not(.active) {
  color: var(--primary-green);
}

/* 모바일 메뉴 토글 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: 2px solid var(--primary-green);
  border-radius: 4px;
  cursor: pointer;
  padding: 8px 10px;
  z-index: 1000;
  min-width: 44px;
  min-height: 44px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 3px;
  background-color: var(--primary-green);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}

.mobile-menu-toggle.active {
  background-color: var(--secondary-green);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* 버튼 스타일 */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 1rem;
  line-height: 1.5;
}

.btn-primary {
  background-color: var(--primary-green);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
  background-color: var(--primary-green);
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: var(--text-dark);
  border: 2px solid var(--border-gray);
}

.btn-outline:hover {
  background-color: var(--bg-gray);
  border-color: var(--text-gray);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* 카드 스타일 */
.card {
  background-color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-gray);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-header {
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--text-gray);
  font-size: 0.875rem;
}

.card-body {
  margin-bottom: 1rem;
}

.card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray);
}

/* 그리드 시스템 */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 폼 스타일 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-label.required::after {
  content: '*';
  color: var(--error-red);
  margin-left: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: var(--transition);
  background-color: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: var(--error-red);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-help {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.checkbox-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
}

/* 푸터 */
.global-footer {
  background-color: var(--text-dark);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-company h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer-company p {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer-section h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
}

.footer-social a:hover {
  background-color: var(--primary-green);
}

/* 배지 */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-primary { background-color: var(--secondary-green); color: var(--primary-green); }
.badge-success { background-color: #E6F9F0; color: var(--success-green); }
.badge-warning { background-color: #FFF4E6; color: var(--warning-orange); }
.badge-danger { background-color: #FFE6E6; color: var(--error-red); }

/* 유틸리티 클래스 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-green); }
.text-gray { color: var(--text-gray); }
.text-light { color: var(--text-light); }

.bg-primary { background-color: var(--primary-green); }
.bg-gray { background-color: var(--bg-gray); }
.bg-white { background-color: var(--bg-white); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* 반응형 디자인 */
@media (max-width: 1024px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .section { padding: 60px 0; }
  
  .header-container {
    gap: 1rem;
  }
  
  .main-nav {
    gap: 0.8rem;
  }
  
  .main-nav a {
    font-size: 0.85rem;
  }
  
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  html { font-size: 14px; }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  .section { padding: 40px 0; }
  
  .global-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background-color: white !important;
  }
  
  .header-container {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    grid-template-areas: "logo lang menu" !important;
    gap: 0.5rem !important;
    padding: 0.75rem 15px !important;
    position: relative !important;
    align-items: center !important;
  }
  
  .logo {
    gap: 0.4rem !important;
    max-width: none !important;
    grid-area: logo !important;
  }
  
  .logo-image {
    height: 45px !important;
  }
  
  .logo-text-main {
    font-size: 0.95rem !important;
  }
  
  .logo-text-sub {
    font-size: 0.6rem !important;
  }
  
  .header-actions {
    display: flex !important;
    gap: 0.5rem !important;
    grid-area: lang !important;
  }
  
  .header-actions .btn {
    display: none !important;
  }
  
  .lang-switch {
    order: 1 !important;
  }
  
  .main-nav {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background-color: white !important;
    flex-direction: column !important;
    padding: 1rem !important;
    box-shadow: var(--shadow-md) !important;
    gap: 0 !important;
    grid-column: 1 / -1 !important;
    z-index: 999 !important;
    justify-content: flex-start !important;
  }
  
  .main-nav.active {
    display: flex !important;
  }
  
  .main-nav a {
    padding: 1rem !important;
    border-bottom: 1px solid var(--border-gray) !important;
    flex-direction: row !important;
    gap: 0.75rem !important;
    align-items: center !important;
    font-size: 1rem !important;
  }
  
  .main-nav a i {
    font-size: 1.5rem !important;
  }
  
  .main-nav a::after {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
    grid-area: menu !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  
  .header-actions {
    display: flex;
    gap: 0.5rem;
  }
  
  .header-actions .btn {
    display: none;
  }
  
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container,
  .container-wide {
    padding: 0 15px;
  }
  
  .header-container {
    padding: 0.75rem 15px;
  }
  
  .logo {
    gap: 0.3rem;
  }
  
  .logo-image {
    height: 40px;
  }
  
  .logo-text-main {
    font-size: 0.95rem;
  }
  
  .logo-text-sub {
    font-size: 0.65rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .card {
    padding: 1rem;
  }
}

/* 애니메이션 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

.slide-down {
  animation: slideDown 0.6s ease-out;
}

/* 로딩 스피너 */
.spinner {
  border: 3px solid var(--border-gray);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

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

/* 접근성 */
.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;
}

/* 프린트 스타일 */
@media print {
  .global-header,
  .global-footer,
  .btn,
  .mobile-menu-toggle {
    display: none;
  }
  
  body {
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
}