/* ==============================
   Reset & Base
============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', Arial, sans-serif;
  margin-top: 30px;
  line-height: 1.9;
  font-size: 1.1rem;
  background-color: #f8f8f8;
  color: #333;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ==============================
   Layout
============================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==============================
   상단 바
============================== */
.top-bar {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 1000;
}

.top-container {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 72px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ==============================
   언어 토글
============================== */
.lang-toggle {
  font-size: 14px;
  font-weight: 700;
  color: #666;
}

.lang-toggle:hover {
  color: #000;
}

/* ==============================
   햄버거 버튼 (모바일 전용)
============================== */
.menu-toggle {
  display: none;
  width: 42px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 7px 0;
  background: #222;
}

/* ==============================
   메인 내비게이션 (데스크탑)
============================== */
.main-nav {
  background: #fff;
  position: relative;
  z-index: 999;
  overflow: visible;
}

.main-nav .container {
  overflow: visible;
}

.nav-menu {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  overflow: visible;
}

.nav-menu > .nav-item {
  position: relative;
}

.nav-menu > .nav-item > a {
  display: block;
  padding: 20px 0;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  color: #1a1f3c;
}

/* ==============================
   드롭다운 서브메뉴
============================== */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 180px;
  border: 1px solid #ddd;
  z-index: 9999;
}

/* 맨 오른쪽 메뉴는 오른쪽 정렬 (화면 밖으로 안 나가게) */
.nav-menu > .nav-item:last-child .sub-menu {
  left: auto;
  right: 0;
}

.nav-menu .sub-menu li a {
  display: block;
  padding: 10px 15px;
  font-size: 14px;
  white-space: nowrap;
  color: #333;
}

.nav-menu .sub-menu li a:hover {
  background: #f5f5f5;
}

/* 데스크탑: hover로 서브메뉴 열기 */
.nav-menu > .nav-item:hover .sub-menu {
  display: block;
}

/* ==============================
   반응형 (모바일/태블릿: ~900px)
============================== */
@media (max-width: 900px) {
  .top-container {
    height: 70px;
  }

  /* 햄버거 버튼 표시 */
  .menu-toggle {
    display: inline-block;
  }

  /* nav: 오른쪽에서 슬라이드인 패널 */
  .main-nav {
    display: block;
    position: absolute;
    top: 70px;          /* top-bar 바로 아래 */
    right: -200px;
    width: 180px;
    height: auto;       /* 내용만큼만 */
    background: #fff;
    border-left: 1px solid #eee;
    box-shadow: -2px 0 8px rgba(0,0,0,0.12);
    overflow-y: visible;
    transition: right 0.25s ease;
    z-index: 998;
    padding: 6px 0;
  }

  body.menu-open .main-nav {
    right: 0;           /* 열림 */
  }

  /* 바깥 영역 딤처리 오버레이 - fixed로 화면 전체 덮음 */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 997;
    background: rgba(0,0,0,0.3);
  }

  body.menu-open .nav-overlay {
    display: block;
  }

  /* 세로 메뉴 */
  .nav-menu {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .nav-menu > .nav-item {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .nav-menu > .nav-item > a {
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    display: block;
    border-bottom: 1px solid #eee;
  }

  /* 모바일 서브메뉴: 항상 펼침 (인라인) */
  .nav-menu .sub-menu {
    position: static;
    display: block;
    border: none;
    box-shadow: none;
    min-width: 0;
  }

  .nav-menu .sub-menu li a {
    padding: 4px 20px;
    font-size: 12px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
  }
}

/* ==============================
   히어로 섹션
============================== */
.visual-hero {
  position: relative;
  height: 400px;
  background-image: url('/img/church_photo.png');
  background-size: cover;
  background-position: center;
  color: white;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.hero-text h2 {
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 15px;
}

.hero-text p {
  font-size: 1.1em;
  line-height: 1.8;
}

.hero-logo {
  width: 300px;
  max-width: 90%;
  display: block;
  margin: 0 auto;
  padding: 20px;
}

/* ==============================
   메인 콘텐츠
============================== */
main {
  padding: 60px 20px;
  max-width: 1000px;
  margin: auto;
}

/* 미션 섹션 */
.mission {
  padding: 60px 20px;
  background: #f5f7fa;
  border-top: 1px solid #ddd;
  text-align: center;
}

.mission ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  list-style: none;
  margin-bottom: 20px;
}

.mission ul li {
  background-color: white;
  border: 1px solid #ddd;
  padding: 20px 25px;
  border-radius: 10px;
  min-width: 220px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 프로그램 카드 */
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.program-card {
  background: #ffffff;
  border-left: 5px solid #007bff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.3s;
}

.program-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

/* 공지사항 */
.announcements ul {
  list-style-type: "📍 ";
  padding-left: 20px;
}

.announcements li {
  margin-bottom: 8px;
}

/* 참여 유도 배너 */
.support-callout {
  background-color: #eaf2ff;
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid #d0e0ff;
  border-bottom: 1px solid #d0e0ff;
  margin-top: 40px;
}

.btn-support {
  display: inline-block;
  background-color: #1a1f3c;
  color: white;
  padding: 12px 26px;
  margin-top: 15px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  transition: background 0.3s;
}

.btn-support:hover {
  background-color: #003b8b;
}

/* 주소 */
.address-info {
  text-align: center;
  margin: 40px 0;
  font-size: 0.95em;
  color: #555;
}

/* ==============================
   버튼 공통
============================== */
.btn {
  display: inline-block;
  padding: 7px 14px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  line-height: 1.2;
  box-sizing: border-box;
  min-width: 120px;
}

.btn-primary {
  background-color: #007bff;
  color: #fff;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

/* ==============================
   폼
============================== */
form input, form button {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 1em;
}

select.full-width {
  width: 100%;
  padding: 10px 12px;
  font-size: 1em;
  box-sizing: border-box;
}

.form-row-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.form-row-inline label {
  width: 100px;
  font-weight: 600;
}

.form-row-inline input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  max-width: 400px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group textarea {
  resize: vertical;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-height: 150px;
  max-height: 300px;
}

.submit-btn {
  margin-top: 1rem;
  padding: 0.75rem;
  font-size: 1rem;
  background-color: #004c97;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

.submit-btn:hover {
  background-color: #003870;
}

/* ==============================
   기타
============================== */
.coming-soon {
  text-align: center;
  padding: 100px 20px;
  color: #1a1f3c;
}

.coming-soon h2 {
  font-size: 2em;
  margin-bottom: 10px;
}

.coming-soon p {
  font-size: 1.1em;
}

.donate-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  padding: 15px 20px;
  margin: 40px auto;
  max-width: 800px;
  border-radius: 5px;
  color: #856404;
  font-size: 0.95em;
}

.animated-logo {
  text-align: center;
  margin: 60px auto;
}

.gif-logo {
  width: 200px;
  max-width: 90%;
  padding: 20px;
  background-color: #f2f2f2;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ==============================
   푸터
============================== */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  margin: 0 8px;
}

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