@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&family=Playfair+Display:wght@400;700&display=swap');

/* ===== CSS Variables ===== */
:root {
  --color-primary: #2c5f8a;
  --color-primary-light: #5b8ab5;
  --color-hero-intro: #5B6AB5;
  --color-hero-vision: #6aaa5e;
  --color-hero-mission: #3a8a7e;
  --color-hero-overseas: #5bad6a;
  --color-hero-donate: #4a9a5a;
  --color-footer-bg: #d4982a;
  --color-footer-text: #333;
  --color-accent-orange: #e67e22;
  --color-accent-blue: #3498db;
  --color-accent-red: #e74c3c;
  --color-accent-purple: #9b59b6;
  --color-accent-pink: #e91e63;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #ffffff;
  --color-bg-light: #f8f8f8;
  --color-border: #e0e0e0;
  --font-kr: 'Noto Sans KR', sans-serif;
  --font-en: 'Playfair Display', serif;
  --max-width: 1200px;
  --header-height: 80px;
  --transition: all 0.3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-kr);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
  overflow: visible;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 1; min-width: 0; overflow: hidden; }

.logo-img {
  height: 60px;
  width: auto;
  max-width: 100%;
}

.logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-orange));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 20px;
}

.logo-text h1 {
  font-size: 16px; font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.logo-text .logo-subtitle {
  font-size: 10px; color: var(--color-text-light);
  letter-spacing: 0.5px;
}

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 0; }

.nav-item { position: relative; }

.nav-item > a {
  display: block;
  padding: 28px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  transition: var(--transition);
  letter-spacing: -0.3px;
}

.nav-item > a:hover,
.nav-item > a.active {
  color: var(--color-primary);
}

.nav-item > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20px; right: 20px;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-item > a:hover::after,
.nav-item > a.active::after {
  transform: scaleX(1);
}

.nav-item .dropdown-arrow {
  font-size: 10px; margin-left: 4px;
  transition: transform 0.3s ease;
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: white;
  min-width: 180px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 8px 0;
  z-index: 100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-item:hover .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu a {
  display: block;
  padding: 10px 24px;
  font-size: 14px;
  color: var(--color-text);
  transition: var(--transition);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--color-bg-light);
  color: var(--color-primary);
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 8px;
  z-index: 1001;
  flex-shrink: 0;
}

.mobile-toggle span {
  width: 24px; height: 2px;
  background: var(--color-text);
  transition: var(--transition);
  border-radius: 2px;
}

/* ===== Hero Sections ===== */
.hero {
  margin-top: var(--header-height);
  height: 500px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-carousel {
  position: relative;
  width: 100%; height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide .slide-bg {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-slide .slide-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #2c3e50 0%, #4a6741 50%, #2c5f8a 100%);
  display: flex; align-items: center; justify-content: center;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
}

.hero-title {
  font-size: 48px; font-weight: 300;
  color: white; text-align: center;
  letter-spacing: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease;
}

.hero-dots {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}

.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none; cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active { background: white; transform: scale(1.2); }

/* Page Hero (subpages) */
.page-hero {
  margin-top: var(--header-height);
  padding: 36px 0;
  color: white;
  position: relative;
}

.page-hero h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 6px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-hero.intro { background: var(--color-hero-intro); }
.page-hero.vision { background: var(--color-hero-vision); }
.page-hero.mission { background: var(--color-hero-mission); }
.page-hero.overseas { background: var(--color-hero-overseas); }
.page-hero.donate { background: var(--color-hero-donate); }
.page-hero.news { background: var(--color-hero-intro); }
.page-hero.history { background: var(--color-hero-intro); }

/* ===== Image Placeholder ===== */
.img-placeholder {
  background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 14px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.img-placeholder::before {
  content: '📷';
  font-size: 32px;
  position: absolute;
  opacity: 0.5;
}

.img-placeholder span {
  position: relative; z-index: 1;
  text-align: center; padding: 12px;
  font-size: 12px;
}

/* ===== Main Page Grid ===== */
.photo-grid {
  padding: 60px 0;
}

.photo-grid .grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.photo-grid .grid-item {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.4s ease;
}

.photo-grid .grid-item:hover { transform: scale(1.02); }

.photo-grid .grid-item img,
.photo-grid .grid-item .img-placeholder {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ===== Page Content Sections ===== */
.page-content { padding: 60px 0; }

/* Introduction Page */
.intro-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}

.intro-text { text-align: center; }

.intro-text h3 {
  font-size: 28px; font-weight: 700;
  margin-bottom: 32px;
  line-height: 1.4;
}

.intro-text h3 .highlight-orange { color: var(--color-accent-orange); }
.intro-text h3 .highlight-red { color: var(--color-accent-red); }

.intro-text p {
  font-size: 15px;
  line-height: 2;
  color: var(--color-text);
  margin-bottom: 16px;
}

.intro-text .signature {
  margin-top: 40px;
  font-weight: 700;
  font-size: 16px;
}

.intro-image {
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
}

.intro-image img,
.intro-image .img-placeholder { width: 100%; height: 100%; object-fit: cover; }

/* Vision Page - 3 Column Cards */
.vision-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 60px 0;
}

.vision-card {
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.vision-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.vision-card .card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.vision-card .card-image img,
.vision-card .card-image .img-placeholder { width: 100%; height: 100%; object-fit: cover; }

.vision-card .card-body { padding: 28px; }

.vision-card .card-body h3 {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.vision-card:nth-child(1) .card-body h3 { color: var(--color-text); }
.vision-card:nth-child(2) .card-body h3 { color: var(--color-hero-vision); }
.vision-card:nth-child(3) .card-body h3 { color: var(--color-accent-red); }

.vision-card .card-body p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-light);
}

/* Mission Page */
.mission-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  overflow: hidden;
}

.mission-strip .strip-item {
  aspect-ratio: 5/3;
  overflow: hidden;
}

.mission-strip .strip-item img,
.mission-strip .strip-item .img-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

.mission-heds {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 80px 0;
  text-align: center;
}

.mission-heds .heds-item .letter {
  font-size: 72px;
  font-weight: 900;
  font-family: var(--font-en);
  margin-bottom: 8px;
}

.mission-heds .heds-item:nth-child(1) .letter { color: var(--color-accent-blue); }
.mission-heds .heds-item:nth-child(2) .letter { color: var(--color-accent-red); }
.mission-heds .heds-item:nth-child(3) .letter { color: var(--color-accent-purple); }
.mission-heds .heds-item:nth-child(4) .letter { color: var(--color-accent-pink); }

.mission-heds .heds-item h4 {
  font-size: 16px; font-weight: 500;
  margin-bottom: 4px;
}

.mission-heds .heds-item:nth-child(1) h4 { color: var(--color-accent-blue); }
.mission-heds .heds-item:nth-child(2) h4 { color: var(--color-accent-red); }
.mission-heds .heds-item:nth-child(3) h4 { color: var(--color-accent-purple); }
.mission-heds .heds-item:nth-child(4) h4 { color: var(--color-accent-pink); }

.mission-heds .heds-item .sub { font-size: 14px; color: var(--color-text-light); margin-bottom: 20px; }

.mission-heds .heds-item .divider {
  width: 40px; height: 2px; margin: 0 auto 20px;
}

.mission-heds .heds-item:nth-child(1) .divider { background: var(--color-accent-blue); }
.mission-heds .heds-item:nth-child(2) .divider { background: var(--color-accent-red); }
.mission-heds .heds-item:nth-child(3) .divider { background: var(--color-accent-purple); }
.mission-heds .heds-item:nth-child(4) .divider { background: var(--color-accent-pink); }

.mission-heds .heds-item p {
  font-size: 13px; line-height: 1.9;
  color: var(--color-text-light);
}

/* Board Grid (News / Donation History) */
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 40px 0;
}

.board-item {
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.board-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.board-item .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.board-item .thumb img,
.board-item .thumb .img-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

.board-item .board-info { padding: 20px; }
.board-item .board-info h4 { font-size: 15px; font-weight: 500; margin-bottom: 8px; line-height: 1.4; }
.board-item .board-info .date { font-size: 13px; color: var(--color-text-light); }

/* Donate Page */
.donate-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}

.donate-phone {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 300px; height: 600px;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.phone-screen {
  width: 100%; height: 100%;
  border-radius: 30px;
  overflow: hidden;
}

.phone-screen img,
.phone-screen .img-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

.donate-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-accent-orange);
  margin-bottom: 32px;
  line-height: 1.5;
}

.donate-info h4 { font-size: 16px; font-weight: 700; margin: 24px 0 12px; }
.donate-info ul { padding-left: 20px; }
.donate-info ul li {
  font-size: 14px; line-height: 2;
  position: relative;
  padding-left: 8px;
}
.donate-info ul li::before { content: '•'; position: absolute; left: -12px; color: var(--color-accent-orange); }
.donate-info ul li strong { font-weight: 600; }
.donate-info ul li span { font-size: 13px; color: var(--color-text-light); margin-left: 8px; }

.btn-donate {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 36px;
  border: 2px solid var(--color-text);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-kr);
  cursor: pointer;
  background: white;
  transition: var(--transition);
  letter-spacing: 1px;
}

.btn-donate:hover {
  background: var(--color-text);
  color: white;
}

/* Overseas Pages - Laptop Mockup */
.overseas-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}

.laptop-mockup {
  background: #e0e0e0;
  border-radius: 12px 12px 0 0;
  padding: 20px 20px 0;
  position: relative;
}

.laptop-screen {
  aspect-ratio: 16/10;
  background: #333;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.laptop-screen img,
.laptop-screen .img-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

.laptop-base {
  height: 16px;
  background: #ccc;
  border-radius: 0 0 8px 8px;
  margin: 0 -10px;
}

/* Laptop Slideshow */
.laptop-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.laptop-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.laptop-slideshow img.active { opacity: 1; }

.slideshow-nav {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.slideshow-nav button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slideshow-nav button.active {
  background: white;
  transform: scale(1.3);
}

/* Logo as image */
.logo-img {
  height: 50px;
  width: auto;
}

.overseas-text h3 {
  font-family: var(--font-en);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
}

.overseas-text p { font-size: 15px; line-height: 2; margin-bottom: 16px; }

.overseas-badge {
  display: inline-block;
  padding: 16px 24px;
  border: 1px solid var(--color-border);
  margin-top: 16px;
  font-size: 14px;
}

.overseas-badge .highlight { color: var(--color-accent-orange); font-size: 24px; font-weight: 900; }

/* Library Page */
.library-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
}

.library-item { text-align: center; }

.library-item .lib-img {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.library-item .lib-img img,
.library-item .lib-img .img-placeholder { width: 100%; height: 100%; object-fit: cover; }

.library-item p { font-size: 14px; color: var(--color-text-light); }

.library-cta {
  background: #555;
  color: white;
  padding: 60px;
  text-align: center;
  margin: 40px 0;
  border-radius: 12px;
}

.library-cta h3 { font-size: 24px; margin-bottom: 16px; }
.library-cta h3 .highlight { color: var(--color-accent-orange); font-size: 32px; font-weight: 900; }
.library-cta p { font-size: 15px; opacity: 0.9; }
.library-cta .book-highlight { color: var(--color-accent-orange); font-size: 28px; font-weight: 900; }

/* ===== Footer ===== */
.site-footer {
  background: var(--color-footer-bg);
  padding: 60px 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.footer-info { text-align: center; }

.footer-info h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 2px;
  font-family: var(--font-en), var(--font-kr), sans-serif;
}

.footer-info p {
  font-size: 14px;
  line-height: 2;
  font-family: var(--font-en), var(--font-kr), sans-serif;
  color: var(--color-footer-text);
}

.footer-divider {
  width: 1px;
  background: rgba(0,0,0,0.15);
  display: none;
}

.footer-bottom {
  text-align: center;
  padding: 20px 24px 0;
  margin-top: 32px;
  border-top: 1px solid rgba(0,0,0,0.1);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--color-footer-text);
  opacity: 0.8;
}

.footer-bottom a {
  color: var(--color-footer-text);
  font-weight: 600;
  transition: var(--transition);
}

.footer-bottom a:hover { opacity: 0.7; }

/* ===== Scroll to top ===== */
.scroll-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white; border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
  z-index: 900;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-2px); background: #1e4a6e; }

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

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; }
  .header-inner { overflow: visible; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height); left: 0; right: 0; bottom: 0;
    background: white;
    padding: 0;
    gap: 0;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  .main-nav.open .nav-item {
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-item > a {
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
  }
  .nav-item > a::after { display: none; }
  .dropdown-arrow { display: inline-block; transition: transform 0.3s ease; }
  .nav-item.open .dropdown-arrow { transform: rotate(180deg); }

  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    opacity: 1; visibility: visible;
    padding: 0 0 8px 0;
    display: none;
    border-radius: 0;
    background: #fafafa;
  }
  .nav-item.open .dropdown-menu { display: block; }
  .dropdown-menu a {
    padding: 14px 24px 14px 44px;
    font-size: 15px;
    border-left: 3px solid transparent;
  }
  .dropdown-menu a:hover {
    border-left-color: var(--color-primary);
    background: #f0f0f0;
  }

  .mobile-toggle { display: flex !important; }
  .logo-img { height: 45px; }
  .logo { max-width: calc(100% - 60px); }
  .header-inner { padding: 0 16px; }
  .hero { height: 350px; }
  .hero-title { font-size: 28px; letter-spacing: 4px; }
  .intro-section,
  .donate-section,
  .overseas-section { grid-template-columns: 1fr; }
  .vision-cards,
  .board-grid { grid-template-columns: repeat(2, 1fr); }
  .mission-heds { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .mission-strip { grid-template-columns: repeat(2, 1fr); }
  .library-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 600px) {
  .vision-cards,
  .board-grid,
  .photo-grid .grid-3 { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: repeat(2, 1fr); }
  .mission-heds { grid-template-columns: 1fr; }
  .hero { height: 280px; }
  .hero-title { font-size: 22px; }
  .page-hero h2 { font-size: 18px; letter-spacing: 3px; }
}
