/* 기본 세팅 */
body, html {
  height: 100%;
  margin: 0;
  font-family: 'Noto Sans KR', sans-serif;
  background: #f7f9fb;
  color: #333;
  line-height: 1.6;
}

/* 컨테이너 공통 기본값 */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 40px auto 60px;
  padding: 20px 0;
  box-sizing: border-box;
  text-align: center;
}

/* 검색 결과 페이지 컨테이너 넓이 조정 */
body.people-page .container,
body.theories-page .container,
body.policies-page .container,
body.organizations-page .container,
body.etc-page .container {
  max-width: 100%;
  width: 100%;
  margin: 40px auto 60px;
  padding: 10px;
  text-align: left;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

/* callum.php 전용 컨테이너 가운데 정렬 */
body.callum-page .container {
  max-width: 800px; /* 원하는 너비로 조절 */
  margin: 40px auto 60px;
  padding: 10px;
  text-align: left; /* 텍스트는 왼쪽 정렬 유지 */
}

/* index.php용 중앙 정렬 body */
body.index-page {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f7f9fb;
  margin: 0;
  padding: 0;
}

/* h1 내부 a - 타이틀 */
h1 {
  text-align: center;
  margin-bottom: 0;
}

h1 a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #004080;
  font-size: 1.4em;
  font-weight: 600;
  justify-content: center;
}

.logo {
  width: 70px;
  height: auto;
  vertical-align: middle;
}

.subtitle {
  font-size: 1em;
  color: #666;
  margin-top: 2px;
  margin-bottom: 10px;
  text-align: center;
}

/* 검색창 */
.search-box {
  margin: 25px auto;
  max-width: 600px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.search-box input[type="text"] {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  font-size: 1em;
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
}

.search-box input[type="text"]:focus {
  border-color: #1a73e8;
}

.search-box button {
  padding: 12px 20px;
  font-size: 1em;
  background-color: #004080;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-box button:hover {
  background-color: #003060;
}

/* 칩 네비게이션 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.chip {
  padding: 8px 14px;
  background-color: #eee;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  font-size: 0.9em;
}

.chip:hover {
  background-color: #dcdcdc;
}

/* 카드형 그리드 레이아웃 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* 카드 기본 스타일 */
.person-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  text-align: left;
}

.person-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: bold;
}

.person-card p {
  margin: 4px 0;
  font-size: 0.95rem;
  color: #333;
}

.person-card a {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #0066cc;
  text-decoration: none; /* 링크 밑줄 제거 */
}

.person-card a:hover {
  color: #004080;
}

/* pagination 스타일 */
.pagination {
  margin: 30px auto 60px;
  text-align: center;
  user-select: none;
}

.pagination a {
  display: inline-block;
  width: 40px;
  padding: 8px 0;
  margin: 0 4px;
  border-radius: 6px;
  text-decoration: none;
  background-color: #eee;
  color: #333;
  font-size: 0.95rem;
  text-align: center;
  transition: background-color 0.2s;
  box-sizing: border-box;
}

/* 페이지네이션 대괄호 제거 (가상요소가 있으면) */
.pagination a::before,
.pagination a::after {
  content: none;
}

.pagination a:hover {
  background-color: #ccc;
}

.pagination a.active {
  background-color: #004080;
  color: white;
  font-weight: 600;
  cursor: default;
}

/* footer */
footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9em;
  color: #aaa;
}

/* 구글 번역 박스 최상단 중앙 고정 */
.translate-box {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: center;
}

/* 미디어 출력용 이미지 */
.responsive-img img {
  width: 100%;
  height: auto;
  max-width: 600px;
  max-height: 450px;
  display: block;
  margin: 10px auto;
}

/* 유튜브 iframe 반응형 */
.embed-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 0;
  padding-bottom: 75%; /* 4:3 비율 */
  margin: 10px auto;
}

.embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 반응형 */
@media (max-width: 768px) {
  .search-box {
    flex-direction: column;
    margin-left: 15px;   /* 좌측 여백 추가 */
    margin-right: 15px;  /* 우측 여백 추가 */
  }

  .search-box input[type="text"],
  .search-box button {
    width: 100%;
  }

  body.people-page .container,
  body.theories-page .container,
  body.policies-page .container,
  body.organizations-page .container,
  body.etc-page .container,
  body.callum-page .container {
    max-width: 100%;
    padding: 10px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }

  .pagination a {
    width: auto;
    padding: 8px 12px;
    margin: 0 3px;
  }
}
