/* Common Styles for Erun Express Website */

:root {
  --color-primary: #1e3a8a;
  --color-primary-100: #eff6ff;
  --color-primary-200: #dbeafe;
  --color-primary-600: #1e40af;
  --color-foreground: #0f172a;
  --color-foreground-500: #64748b;
  --color-foreground-600: #475569;
  --color-background: #ffffff;
  --color-content1: #ffffff;
  --color-default-100: #f1f5f9;
  --color-default-200: #e2e8f0;
  --color-divider: #e2e8f0;
  --color-focus: #1e3a8a;
}

.text-primary { color: var(--color-primary); }
.text-primary-600 { color: var(--color-primary-600); }
.text-foreground { color: var(--color-foreground); }
.text-foreground-500 { color: var(--color-foreground-500); }
.text-foreground-600 { color: var(--color-foreground-600); }
.bg-background { background-color: var(--color-background); }
.bg-content1 { background-color: var(--color-content1); }
.bg-default-100 { background-color: var(--color-default-100); }
.bg-default-200 { background-color: var(--color-default-200); }
.bg-primary { background-color: var(--color-primary); }
.bg-primary-100 { background-color: var(--color-primary-100); }
.bg-primary-200 { background-color: var(--color-primary-200); }
.bg-primary\\/20 { background-color: rgba(30, 58, 138, 0.2); }
.border-divider { border-color: var(--color-divider); }
.text-primary-foreground { color: white; }

.badge { width: 64px; height: 64px; }
.text-yellow { color: #eab308; }

.divide-y > * + * {
  border-top-width: 1px;
  border-color: #d1d5db;
}

.hover\\:opacity-hover:hover { opacity: 0.8; }
.active\\:opacity-disabled:active { opacity: 0.5; }

/* Smooth transitions */
.transition-opacity { transition: opacity 0.15s ease; }
.transition-transform-colors-opacity { transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease; }
.transition-transform-background { transition: transform 0.15s ease, background-color 0.15s ease; }
.transition-shadow { transition: box-shadow 0.15s ease; }

/* 카드 호버 모션 효과 */
.card-hover {
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.hidden { display: none; }

/* Details/summary styling */
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }

/* Group states */
.group:hover .group-hover\\:opacity-80 { opacity: 0.8; }
.group[open] .group-open\\:-rotate-90 { transform: rotate(-90deg); }

/* Animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Animation classes */
.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out;
}

.animate-bounceIn {
  animation: bounceIn 0.6s ease-out;
}

.animate-pulse-slow {
  animation: pulse 2s infinite;
}

/* Stagger animations */
.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

/* Service card image styles */
.service-card-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-card-image {
  transform: scale(1.1) rotate(5deg);
}

/* Navigation - 헤더 메뉴 스타일 */
.main-nav {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-divider);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hero Section - 별도 디자인 */
.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('./e8ekly3qr5.png') center/cover;
  opacity: 0.1;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Card Styles */
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 공통 네임스페이스 스타일 */
/* Hero section styles moved to individual pages for page-specific customization */

.erun_service-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.erun_service-card-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
}

.erun_service-card:hover .erun_service-card-image {
  transform: scale(1.1) rotate(5deg);
}

/* Animation classes with prefix */
.erun_animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out;
}

.erun_animate-delay-1 {
  animation-delay: 0.1s;
}

.erun_animate-delay-2 {
  animation-delay: 0.2s;
}

.erun_animate-delay-3 {
  animation-delay: 0.3s;
}

/* Calculator styles with prefix */
.erun_calculator-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.erun_form-label {
  display: block;
  font-weight: 600;
  color: var(--color-foreground);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.erun_form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-default-200);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.erun_form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.erun_calculate-btn {
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.erun_calculate-btn:hover {
  background: var(--color-primary-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

.erun_main-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 1rem;
}

.erun_section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-foreground);
}

.erun_result-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  border: 1px solid var(--color-default-200);
}

.erun_result-highlight {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--color-default-200);
}

.erun_info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.erun_info-label {
  font-size: 0.9rem;
  color: var(--color-foreground-500);
}

.erun_info-value {
  font-weight: 600;
  color: var(--color-foreground);
}

.erun_status-badge {
  background: #22c55e;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.erun_info-icon {
  color: var(--color-primary);
}

.erun_cost-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.erun_cost-label {
  font-size: 0.9rem;
  color: var(--color-foreground-500);
  margin-top: 0.25rem;
}

/* Notice styles with prefix */
.erun_notice-item {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-default-200);
}

.erun_notice-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Mobile Sidebar Menu */
.erun_mobile-sidebar {
  position: fixed;
  top: 64px; /* 네비게이션 바 높이만큼 아래로 이동 */
  left: -50vw;
  width: 50vw;
  height: auto; /* 콘텐츠에 맞춰 높이 조정 */
  max-height: calc(100vh - 64px); /* 최대 높이는 화면 높이에서 네비게이션 바 높이를 뺀 값 */
  background: white;
  z-index: 60;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  border-bottom-right-radius: 12px; /* 오른쪽 하단 모서리 둥글게 */
  transition: left 0.3s ease-in-out;
  overflow-y: auto;
}

.erun_mobile-sidebar.open {
  left: 0;
}

.erun_mobile-overlay {
  position: fixed;
  top: 64px; /* 네비게이션 바 아래부터 시작 */
  left: 0;
  width: 100vw;
  height: calc(100vh - 64px); /* 네비게이션 바 높이를 제외한 높이 */
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.erun_mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.erun_sidebar-content {
  padding: 0;
}

.erun_sidebar-menu-item {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--color-foreground);
  text-decoration: none;
  border-bottom: 1px solid var(--color-default-200);
  transition: background-color 0.2s ease;
  font-size: 1rem;
}

.erun_sidebar-menu-item:first-child {
  border-top-right-radius: 12px; /* 첫 번째 메뉴 항목의 오른쪽 상단 모서리 둥글게 */
}

.erun_sidebar-menu-item:last-child {
  border-bottom: none; /* 마지막 항목의 하단 경계선 제거 */
  border-bottom-right-radius: 12px; /* 마지막 메뉴 항목의 오른쪽 하단 모서리 둥글게 */
}

.erun_sidebar-menu-item:hover {
  background-color: var(--color-default-100);
}

.erun_sidebar-menu-item.active {
  background-color: var(--color-primary-100);
  color: var(--color-primary);
  font-weight: 600;
}

/* 새로운 세로형 배송절차 스타일 */
.shipping-process-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

.shipping-step {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.shipping-step.animate {
  opacity: 1;
  transform: translateY(0);
}

.shipping-step.final-step {
  margin-bottom: 0;
}

.step-connector {
  position: absolute;
  left: 37px;
  top: 75px;
  width: 2px;
  height: 80px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-600));
  opacity: 0.3;
  border-radius: 1px;
}

.final-step .step-connector {
  display: none;
}

.step-circle {
  width: 75px;
  height: 75px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-600));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.3);
  position: relative;
  z-index: 10;
  transition: all 0.3s ease;
}

.step-circle.final {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.step-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(30, 58, 138, 0.4);
}

.step-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.step-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  flex: 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s;
}

.step-card:hover::before {
  left: 100%;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.15);
  border-color: var(--color-primary);
}

.step-icon-large {
  font-size: 2.5rem;
  display: inline-block;
  flex-shrink: 0;
}

.step-content {
  text-align: left;
  flex: 1;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.step-subtitle {
  font-size: 0.9rem;
  color: var(--color-foreground-500);
  line-height: 1.5;
}

/* 애니메이션 */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .shipping-step {
    margin-bottom: 2rem;
  }
  
  .step-circle {
    width: 60px;
    height: 60px;
    margin-right: 1.5rem;
  }
  
  .step-number {
    font-size: 1.2rem;
  }
  
  .step-card {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .step-icon-large {
    font-size: 2rem;
  }
  
  .step-title {
    font-size: 1rem;
  }
  
  .step-subtitle {
    font-size: 0.85rem;
  }
  
  .step-connector {
    left: 29px;
    height: 80px;
  }
}

/* Title rotation animation */
@keyframes titleFade {
  0% { opacity: 1; }
  30% { opacity: 0; }
  70% { opacity: 0; }
  100% { opacity: 1; }
}

.title-rotating {
  animation: titleFade 3s ease-in-out infinite;
}