/* ========== 기본 설정 ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a5c5e;
  --secondary: #2a8a8c;
  --accent: #5bb5c5;
  --bg: #f8fafb;
  --text: #2d3436;
  --text-light: #636e72;
  --white: #ffffff;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

a {
  color: var(--secondary);
  text-decoration: none;
}

/* ========== 네비게이션 ========== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: var(--white);
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 700;
  transition: color 0.3s;
}

#navbar.scrolled .nav-logo {
  color: var(--primary);
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-logo-kr {
  font-size: 1.35rem;
  font-weight: 700;
}

.nav-logo-en {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.75;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

#navbar.scrolled .nav-links a {
  color: var(--text);
}

#navbar.scrolled .nav-links a:hover {
  color: var(--primary);
}

/* 모바일 메뉴 토글 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: background 0.3s, transform 0.3s;
}

#navbar.scrolled .nav-toggle span {
  background: var(--text);
}

/* ========== 히어로 섹션 ========== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

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

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  margin-bottom: 40px;
  letter-spacing: 0.05em;
}

.hero-cta {
  display: inline-block;
  padding: 14px 36px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50px;
  color: var(--white);
  font-weight: 500;
  font-size: 1rem;
  transition: background 0.3s, border-color 0.3s;
}

.hero-cta:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
}

/* 페이드인 애니메이션 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 미션 섹션 ========== */
#mission {
  padding: 100px 0;
  background: var(--white);
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-desc {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 60px;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.mission-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.mission-icon {
  width: 48px;
  height: 48px;
  color: var(--secondary);
  margin-bottom: 20px;
}

.mission-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.mission-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ========== 비전 생태계 섹션 ========== */
#vision {
  padding: 100px 0;
  background: var(--bg);
}

.vision-diagram {
  text-align: center;
  margin-bottom: 60px;
}

.vision-diagram img {
  max-width: 100%;
  width: 720px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.vision-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.vision-value {
  text-align: center;
  padding: 28px 20px;
}

.vision-value strong {
  display: block;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.vision-value p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ========== 소식 섹션 ========== */
#news {
  padding: 100px 0;
  background: var(--white);
}

#news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 30px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

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

.news-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 500;
  min-width: 100px;
  padding-top: 2px;
}

.news-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.news-info p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
}

.pagination button {
  min-width: 40px;
  height: 40px;
  border: 1.5px solid var(--border, #dfe6e9);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.pagination button:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.pagination button.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

.pagination button.pg-arrow {
  font-size: 1.1rem;
  padding: 0 12px;
}

/* 모달 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

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

.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text);
}

.modal-date {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-right: 32px;
}

.modal-body {
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.8;
}

.modal-images {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-images img {
  max-width: 100%;
  border-radius: 8px;
}

.modal-files {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #dfe6e9);
}

.modal-files-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
}

.modal-file-link {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 6px 6px 0;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--secondary);
  transition: background 0.2s;
}

.modal-file-link:hover {
  background: #e8f0f1;
}

/* ========== 푸터 ========== */
#contact {
  background: var(--primary);
  color: var(--white);
  padding: 60px 0 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 12px;
}

.footer-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-eng {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
}

.footer-contact a {
  color: var(--accent);
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.admin-link {
  color: rgba(255, 255, 255, 0.3);
  margin-left: 8px;
}

.admin-link:hover {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

/* ========== 스크롤 애니메이션 ========== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 카드 순차 등장 딜레이 */
.mission-card.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.mission-card.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.mission-card.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }

.vision-value.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.vision-value.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }

/* ========== 반응형: 태블릿 ========== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    max-height: 300px;
    padding: 16px 0;
  }

  .nav-links a {
    color: var(--text) !important;
    display: block;
    padding: 12px 24px;
    font-size: 1rem;
  }

  .vision-diagram img {
    width: 100%;
    max-width: 100%;
  }

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

  .news-card {
    flex-direction: column;
    gap: 8px;
  }

  .modal-content {
    padding: 28px 24px;
  }

  .vision-values {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* ========== 반응형: 모바일 ========== */
@media (max-width: 480px) {
  .nav-inner {
    height: 60px;
  }

  .nav-logo img {
    height: 32px;
  }

  .nav-logo-kr {
    font-size: 1.05rem;
  }

  .nav-logo-en {
    font-size: 0.6rem;
  }

  .nav-links {
    top: 60px;
  }

  #hero {
    padding: 80px 20px 60px;
  }

  #mission,
  #vision,
  #news {
    padding: 70px 0;
  }

  .news-card {
    flex-direction: column;
    gap: 8px;
  }

  .mission-card {
    padding: 28px 22px;
  }

  .section-desc {
    margin-bottom: 40px;
  }
}
