/* 브라우저별 폰트 크기 일관성 유지 */
html, body {
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: none;
  text-size-adjust: none;
  font-synthesis: none; /* Safari에서 bold 이슈 방지 */
}
/* 기본 설정 및 변수 */
:root {
  --primary-color: #3182ce;
  --secondary-color: #00b5ad;
  --accent-color: #f97316;
  --text-color: #2d3748;
  --light-text: #718096;
  --bg-color: #ffffff;
  --light-bg: #f7fafc;
  --dark-bg: #2d3748;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* 전체 리셋 및 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--light-bg);
}

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

a:hover {
  color: var(--secondary-color);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 헤더 스타일 */
header {
  background-color: var(--bg-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 1.5rem;
}

.nav-menu a {
  font-weight: 600;
  color: var(--text-color);
  position: relative;
  padding-bottom: 5px;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-color);
}

/* 히어로 섹션 */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('../assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 6rem 0;
  margin-bottom: 3rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-logo {
  width: 150px;
  margin-bottom: 1.5rem;
  animation: fadeIn 1s ease-in-out;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: slideUp 1s ease-in-out;
}

.slogan {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: slideUp 1s ease-in-out 0.3s forwards;
  opacity: 0;
}
.slogan {
  color: #f0f0f0;  /* 밝은 회색 */
  /* 또는 완전한 흰색을 원한다면 */
  /* color: #ffffff; */
}

/* 섹션 스타일 */
section {
  padding: 4rem 0;
}

section h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}

section p {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--light-text);
}

/* 버튼 스타일 */
.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
  margin: 0 auto;
  box-shadow: 0 4px 6px rgba(49, 130, 206, 0.2);
}

.btn:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 181, 173, 0.3);
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.7rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(49, 130, 206, 0.3);
}

/* About 섹션 */
.about {
  background-color: var(--bg-color);
  text-align: center;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 3rem 2rem;
}

/* 프로그램 섹션 */
.programs {
  background-color: var(--light-bg);
}

.program-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1100px;
}

.program-item {
  background-color: var(--bg-color);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.program-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.program-item h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.program-item p {
  color: var(--light-text);
  margin-bottom: 0;
}

/* 회원 가입 섹션 */
.join {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), url('../assets/images/join-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 5rem 0;
  margin: 3rem 0;
  border-radius: 10px;
}

.join h2 {
  color: white;
}

.join h2::after {
  background-color: white;
}

.join p {
  color: rgba(255, 255, 255, 0.8);
}

.join .btn-outline {
  color: white;
  border-color: white;
}

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

/* 연락처 페이지 */
.contact-hero {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.contact-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-form-section {
  padding: 3rem 0;
}

.form-container {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--bg-color);
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.submit-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  width: 100%;
  font-size: 1rem;
}

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

/* 회원 페이지 */
.membership-page ul {
  max-width: 700px;
  margin: 0 auto 2rem;
  padding-left: 2rem;
}

.membership-page li {
  margin-bottom: 0.8rem;
}

/* 정관 페이지 */
.bylaws {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-color);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* 푸터 */
footer {
  background-color: var(--dark-bg);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 40px;
}

.footer-info p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
  text-align: left;
}

.footer-links h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.25rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.copyright {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* 반응형 디자인 */
@media screen and (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
  }
  
  .nav-menu.active {
    top: 0;
  }
  /* 4. 배경 스크롤 차단 */
  body.menu-open {
    overflow: hidden; /* 핵심 코드 추가! */
  }  
  .nav-menu li {
    margin: 0;
    padding: 0.8rem 0;
    border-top: 1px solid var(--border-color);
  }
  
  .mobile-menu-btn {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .slogan {
    font-size: 1.2rem;
  }
  
  section h2 {
    font-size: 1.8rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-info p {
    text-align: center;
  }
}
/* ── container에 Flex 적용 ── */
.site-header .container {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}

/* 메뉴 가로 나열 보장 */
.site-header .nav-menu {
  display: flex !important;
  gap: 0.10rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* ── 페이지 헤더 설명 글씨 색 변경 ── */
.site-header + section p.page-intro {
  color: #ffffff;          /* 흰색으로 변경 (원하면 #eee, #f5f5f5 등으로 조정 가능) */
}
.page-intro {
  color: #ffffff !important;
}
/* ── 회원 안내 섹션: 박스는 가운데, 내부 텍스트는 좌측 정렬 ── */

/* 1) 메인 컨테이너는 가운데 텍스트 정렬 */
.center-text {
  text-align: center;
}

/* ── membership.php 전용 레이아웃 ── */
.membership-content {
  display: flex;
  flex-direction: column;    /* 세로로 쌓기 */
  align-items: center;       /* 자식요소(블록)를 가로 중앙에 배치 */
  gap: 1rem;                 /* 제목↔본문↔리스트 간격 */
  padding: 2rem 0;           /* 위아래 여백 */
}

.membership-content > h2 {
  text-align: center;
  margin: 0;
}

/* 여기부터가 핵심  */
.membership-content > p,
.membership-content > ul {
  display: inline-blck;     /* 인라인블록으로 바꿔서 중앙에 놓이고 */
  max-width: 600px;          /* 너비 제한 */
  width: 90%;                /* (또는 width:auto) */
  text-align: left;          /* 내부 글씨는 좌측 정렬 */
  margin: 0;                 /* 외부여백 리셋 */
  padding: 0;                /* 내부여백 리셋 */
}

/* 리스트만 살짝 손봐서 bullets 박스 안쪽에 */
.membership-content > ul {
  list-style-position: inside;
  padding-left: 1.2rem;
}

.membership-content > ul > li {
  margin-bottom: 0.5rem;
}
/* 기본 상태에서 숨기기 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* 모바일용 스타일 */
@media (max-width: 768px) {
  /* 햄버거 버튼 */
  .menu-toggle {
    display: block !important;
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 9999;
    font-size: 24px;
    background: none;
    border: none;
    color: #333;
  }

  /* 모바일 메뉴 */
  .nav-menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 9998;
    transition: top 0.4s;
    padding-top: 70px;
    overflow-y: auto;
  }
  .nav-menu.active {
    top: 0;
  }

  /* 헤더와의 겹침 방지 */
  .site-header {
    position: relative;
    z-index: 1100; /* 메뉴보다 상위 레이어 */
  }

  /* 메뉴 아이템 스타일 통일 */
  .nav-menu li {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
  }
}
section.join {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(to right, #2e2e2e, #4a4a4a);
  color: white;
  border-radius: 8px;
  max-width: 800px;
  margin: 60px auto; /* 상단 여백 + 수평 가운데 정렬 */
}

section.join .btn-outline {
  margin-top: 20px;
  padding: 10px 20px;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

section.join .btn-outline:hover {
  background: #fff;
  color: #333;
}
  /* 헤더 컨테이너 스타일 */
  .site-header .container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
  }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 42px;
  vertical-align: middle;
}

.logo span {
  font-size: 1.8rem;
  font-weight: bold;
  color: #337ab7;
}
  /* 로고 위치 보정 */
  .logo {
    position: relative;
    z-index: 9999;
}
.wide-spacing {
  letter-spacing: 0.5em; /* 또는 10px 등 원하는 값 */
}
/* 브라우저별 차이 해결을 위한 CSS */
:root {
  --vh: 1vh;
}

@media (max-width: 768px) {
  .nav-menu {
    height: calc(var(--vh, 1vh) * 100);
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9998;
    transition: top 0.4s;
    padding-top: 70px;
    overflow-y: auto;
  }
  .nav-menu.active {
    top: 0;
  }
  header {
    padding-top: env(safe-area-inset-top, 0px);
  }
}
@media screen and (max-width: 480px) {
  .hero h1 {
    font-size: 1.4rem;
  }
  .slogan {
    font-size: 1rem;
  }
  section h2 {
    font-size: 1.2rem;
  }
  section p {
    font-size: 0.95rem;
  }
  .program-item h3 {
    font-size: 1.2rem;
  }
  .program-item p {
    font-size: 0.9rem;
  }
}
@media (max-width: 768px) {
  /* 햄버거 메뉴 스타일 수정 */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -80vw; /* 초기에는 화면 밖에 위치 */
    width: 40vw; /* 화면의 80%만 차지 */
    max-width: 320px; /* 최대 너비 제한 */
    height: 47vh;
    background: #fff;
    z-index: 9998;
    transition: right 0.4s; /* top 대신 right로 전환 애니메이션 */
    padding-top: 70px;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0,0,0,0.08);
    left: auto; /* left 속성 해제 */
  }
  
  .nav-menu.active {
    right: 0; /* 활성화 시 오른쪽에서 슬라이드 */
    top: 0;
  }
  
  /* 오버레이 추가 */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 9997;
  }
  
  .menu-overlay.active {
    display: block;
  }
}
/* 브라우저별 폰트 크기 일관성 유지 */
html, body {
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: none;
  text-size-adjust: none;
}

/* 모바일 폰트 크기 조정 */
@media screen and (max-width: 480px) {
  .hero h1 {
    font-size: 1.4rem;
  }
  .slogan {
    font-size: 1rem;
  }
  section h2 {
    font-size: 1.2rem;
  }
  section p {
    font-size: 0.95rem;
  }
}
