body {
  font-family: "HancomMalangMalang", sans-serif !important;
}

.navbar-brand img {
  height: 25px;
}

.nav-item .nav-link {
  margin: 0 10px;
  position: relative;
  padding-bottom: 10px; /* 아래 패딩 추가 */
}

.nav-item .nav-link.current-page::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px; /* 글자 3px 아래에 위치 */
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  border-radius: 5px;
  background-color: blue;
  opacity: 0.2; /* 투명도 50% */
}

.index-page .nav-item .nav-link.current-page::after {
  display: none;
}

/* 현대적인 햄버거 버튼 스타일 - 개선 */
.navbar-toggler {
  border: none !important;
  background: transparent !important;
  padding: 10px;
  outline: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1100;
  transition: transform 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: none !important;
}

/* 햄버거 아이콘 애니메이션 */
.hamburger-icon {
  width: 24px;
  height: 20px;
  position: relative;
}

.hamburger-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: #333;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.hamburger-icon span:nth-child(1) {
  top: 0px;
}

.hamburger-icon span:nth-child(2),
.hamburger-icon span:nth-child(3) {
  top: 9px;
}

.hamburger-icon span:nth-child(4) {
  top: 18px;
}

/* X 모양으로 변하는 애니메이션 */
.navbar-toggler.open .hamburger-icon span:nth-child(1) {
  top: 9px;
  width: 0%;
  left: 50%;
}

.navbar-toggler.open .hamburger-icon span:nth-child(2) {
  transform: rotate(45deg);
}

.navbar-toggler.open .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg);
}

.navbar-toggler.open .hamburger-icon span:nth-child(4) {
  top: 9px;
  width: 0%;
  left: 50%;
}

.navbar-toggler:hover .hamburger-icon span {
  background: #1a73e8;
}

.container,
.container-fluid {
  padding: 0 !important;
  max-width: 100% !important; /* 최대 폭 제한 제거 */
}

.language-switch {
  display: flex;
  align-items: center;
  font-weight: bold;
  cursor: pointer;
}

.language-option {
  cursor: pointer;
  font-weight: bold;
  margin: 0 5px;
}

.language-option.active {
  color: black;
  opacity: 1;
}

.language-option.inactive {
  color: black;
  opacity: 0.4;
}

/* 반응형 디자인을 위한 추가 스타일 */
@media (max-width: 991px) {
  .language-switch.d-lg-none {
    display: flex;
  }
  .language-switch.d-none.d-lg-flex {
    display: none;
  }
  .navbar-toggler {
    margin-left: 20px;
  }
}

/* 드롭다운 메뉴 커스텀 스타일 */
.dropdown-menu-custom {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 10px 0;
  text-align: center;
  transition: all 0.3s ease;
}

.dropdown-menu-custom.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fadeDown 0.3s ease forwards;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu-custom a {
  display: block;
  padding: 10px 20px;
  color: black;
  text-decoration: none;
  width: 100%;
  text-align: center;
  font-family: "HancomMalangMalang", sans-serif;
  transition: all 0.2s ease;
}

.dropdown-menu-custom a:hover {
  background-color: #f1f1f1;
  color: #1a73e8;
}

/* 새로운 푸터 스타일 */
.modern-footer {
  background-color: #1e293b;
  color: #e2e8f0;
  position: relative;
  font-family: "Noto Sans KR", sans-serif;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
  z-index: 10; /* 푸터 z-index 추가 */
  box-sizing: border-box; /* 박스 모델 명확히 지정 */
  overflow: hidden; /* 내부 요소가 넘치지 않도록 설정 */
  width: 100%; /* 전체 너비 명시 */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  box-sizing: border-box; /* 박스 모델 추가 */
  width: 100%; /* 너비 명시 */
}

.footer-brand {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-self: flex-end; /* 브랜드 영역 하단 정렬 */
  margin-bottom: 1rem; /* 하단 마진 추가 */
  align-items: center; /* 중앙 정렬 추가 */
  text-align: center; /* 텍스트 중앙 정렬 */
}

.footer-logo-container {
  display: flex; /* block에서 flex로 변경 */
  align-items: flex-end; /* 항목들을 하단 정렬 */
  margin-bottom: 1rem;
  gap: 0.8rem; /* 로고와 깃허브 아이콘 사이 간격 */
  justify-content: center; /* 중앙 정렬 추가 */
}

.footer-logo {
  height: 2.8rem; /* 로고 크기 */
  width: auto;
  filter: brightness(1.2);
  opacity: 0.8; /* 투명도 적용 */
}

.github-icon {
  width: 24px; /* 깃헙 아이콘 크기 조정 */
  height: 24px;
  color: #e2e8f0;
  opacity: 0.8; /* 투명도 적용 */
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex; /* inline-block에서 inline-flex로 변경 */
  align-items: center;
  margin-bottom: 0.1rem; /* 미세 조정 - 완전 바닥이 아닌 약간 위로 */
}

.copyright {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center; /* 중앙 정렬 추가 */
}

.copyright i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.footer-column {
  min-width: 180px;
}

/* 구성원 전용 링크를 위한 확장 스타일 */
.members-links {
  min-width: 380px; /* 더 넓은 공간 확보 */
}

.members-grid {
  display: flex;
  gap: 2rem;
}

.members-grid .footer-list {
  min-width: 160px;
}

.footer-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

.footer-heading::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, #1a73e8, #4285f4);
  border-radius: 2px;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-item {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.footer-item i {
  margin-right: 0.5rem;
  color: #4285f4;
  font-size: 0.9rem;
  opacity: 0.85;
  width: 20px; /* 아이콘에 고정 너비 지정 */
  text-align: center; /* 아이콘 중앙 정렬 */
}

.footer-link {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.footer-link:hover {
  color: #4285f4;
  text-decoration: none;
}

/* 특수한 경우 스타일 오버라이드 */
body.override-footer-layout .footer-container {
  display: flex !important;
  flex-direction: row !important;
}

body.override-footer-layout .footer-brand,
body.override-footer-layout .footer-links {
  width: auto !important;
}

/* 반응형 스타일 - 개선된 미디어 쿼리 */
@media (max-width: 991px) {
  .footer-container {
    padding: 2rem 1.5rem;
  }

  .footer-links {
    flex: 1;
    width: 100%;
    justify-content: space-around;
  }

  .members-links {
    min-width: 340px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column-reverse; /* 브랜드 영역을 아래로 */
    padding: 2rem 1.5rem;
  }

  .footer-brand {
    margin-bottom: 0;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
  }

  .footer-links {
    gap: 2rem;
    width: 100%;
    justify-content: space-between;
  }

  .members-links {
    min-width: 100%;
  }

  .members-grid {
    flex-direction: row;
    gap: 1.5rem;
    justify-content: space-between;
  }

  .members-grid .footer-list {
    min-width: calc(50% - 1rem);
    flex: 1;
  }
}

@media (max-width: 576px) {
  .footer-container {
    padding: 1.5rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-column {
    width: 100%;
  }

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

  .members-grid {
    flex-direction: column;
    gap: 0.5rem;
  }

  .members-grid .footer-list {
    width: 100%;
    min-width: 100%;
  }

  .footer-item {
    margin-bottom: 0.6rem;
  }
}

/* 푸터 구분 경계선 */
main {
  min-height: calc(100vh - 300px);
  padding-bottom: 3rem;
  position: relative;
  z-index: 1; /* z-index 추가하여 푸터 뒤에 오게 함 */
}
