/* ==========================================================================
   공용 CSS 스타일시트 (style.css)
   프레임워크 없이 순수 CSS로 작성된 모던 & 반응형 디자인 시스템
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-dark: #1e40af;
  --secondary: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #93c5fd;
  --accent: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --max-width: 1200px;
  --transition: all 0.25s ease-in-out;
}

/* 기본 리셋 및 폰트 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 컨테이너 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   헤더 & 내비게이션
   ========================================================================== */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--secondary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.main-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
  font-weight: 700;
}

.nav-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background-color: #e2e8f0;
  color: var(--text-muted);
}

.nav-link.active .nav-badge {
  background-color: var(--primary);
  color: white;
}

/* ==========================================================================
   메인 콘텐츠 & 섹션 전환
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.page-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.page-section.active {
  display: block;
}

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

/* ==========================================================================
   히어로 배너 (Hero Section)
   ========================================================================== */
.hero-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background-color: rgba(255, 255, 255, 0.12);
  color: #93c5fd;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 720px;
  margin-bottom: 1.75rem;
  font-weight: 300;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #94a3b8;
}

.hero-meta-item strong {
  color: #ffffff;
}

/* ==========================================================================
   카드 & 그리드 컴포넌트
   ========================================================================== */
.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

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

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 미션 & 비전 카드 특화 */
.value-card {
  border-left: 4px solid var(--primary);
  background: linear-gradient(to right, #f8fafc, #ffffff);
}

.value-card.vision {
  border-left-color: var(--accent);
}

/* ==========================================================================
   연혁 타임라인 (Timeline)
   ========================================================================== */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.timeline-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.timeline-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   테이블 & 개요
   ========================================================================== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.info-table th,
.info-table td {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-color);
}

.info-table th {
  width: 25%;
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   오시는 길 (Location) 전용 스타일
   ========================================================================== */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.map-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.map-view-box {
  width: 100%;
  height: 380px;
  background-color: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-actions {
  padding: 1rem 1.5rem;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

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

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

.btn-outline {
  background-color: white;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.transit-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.transit-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.transit-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.transit-detail h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.transit-detail p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ==========================================================================
   로딩 및 알림 상태 (Loading & Alerts)
   ========================================================================== */
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

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

.error-alert {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: none;
}

/* ==========================================================================
   푸터 (Footer)
   ========================================================================== */
.site-footer {
  background-color: var(--secondary);
  color: #94a3b8;
  padding: 3rem 0 2rem;
  border-top: 1px solid #1e293b;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.footer-info {
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-badge-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

/* ==========================================================================
   미디어 쿼리 (반응형 모바일/태블릿)
   ========================================================================== */
@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-card {
    padding: 2.5rem 1.5rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .grid-2, .grid-4 {
    grid-template-columns: 1fr;
  }

  .header-inner {
    height: auto;
    padding: 1rem 0;
    flex-direction: column;
    gap: 1rem;
  }

  .info-table th {
    width: 35%;
  }

  .footer-inner {
    flex-direction: column;
  }
}
