/* font */
body {
  font-family: "Roboto", sans-serif;
  --bs-body-font-family: "Roboto", sans-serif;
  padding-top: 74.32px;
  color: #f8f9fa;
}

h1 {
  font-family: "Roboto", sans-serif;
  font-weight: 700; /* Bold */
  color: #f8f9fa;
}

p {
  font-family: "Roboto", sans-serif;
  font-weight: 300; /* Regular */
  line-height: 1.8; /* 줄간격을 기본보다 넓게 설정 */
  font-size: 1.2rem; /* 기본 폰트 크기 */
  color: #f8f9fa;
}

ul li,
ol li {
  font-family: "Roboto", sans-serif;
  font-weight: 300; /* Regular */
  line-height: 1.8; /* 줄간격을 기본보다 넓게 설정 */
}

.navbar {
  --bs-navbar-padding-y: 1rem;
}

/* 기본 nav-link 색상 */
.navbar-nav .nav-link {
  color: #a6a6a6;
  transition: color 0.3s;
}

/* 호버 시 */
.navbar-nav .nav-link:hover {
  color: #ffffff;
}

/* 활성 상태 (어두운 배경) */
.navbar-nav .nav-link.active {
  color: #ffffff;
}

/* 스크롤 후 상태 (밝은 배경) */
body.scrolled .navbar-nav .nav-link {
  color: #333333;
}

body.scrolled .navbar-nav .nav-link:hover {
  color: #000000;
}

/* 스크롤 후 활성 상태 */
body.scrolled .navbar-nav .nav-link.active {
  color: #000000;
}

/* 드롭다운 열렸을 때 */
.navbar-nav .nav-item.dropdown.show > .nav-link,
.navbar-nav .nav-link.show {
  color: #ffffff !important;
}

body.scrolled .navbar-nav .nav-item.dropdown.show > .nav-link,
body.scrolled .navbar-nav .nav-link.show {
  color: #000000 !important;
}

/* 드롭다운 화살표 제거 */
.nav-link.dropdown-toggle::after {
  display: none !important;
}

/* 토글러 기본: 흰색 아이콘 (검정 배경용) */
.scroll-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* 토글러 스크롤 후: 검정색 아이콘 (흰 배경용) */
body.scrolled .scroll-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='black' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.dropdown-menu ul {
  list-style: none;
  padding: 0;
}

li.dropdown-item {
  padding: 4px 16px 4px 0px;
}

.dropdown-menu {
  border: none;
  position: absolute;
  right: 0;
  left: auto;
}

.dropdown-item,
.nav-item,
.language,
.btn {
  font-family: "Roboto", sans-serif;
  font-weight: 300; /* Regular */
}

.dropdown-item {
  white-space: nowrap; /* 줄바꿈 방지 */
  overflow-wrap: normal; /* 단어 단위로 줄바꿈 */
  word-break: keep-all; /* 단어 중간에서 줄바꿈 금지 */
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23000000' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

span.navbar-toggler-icon {
  width: 17px;
  height: 17px;
}

button.navbar-toggler {
  font-size: 0px;
  padding: 8px 12px;
}

.navbar-toggler {
  --bs-border-width: none;
  --bs-navbar-toggler-focus-width: none;
}

/* 기본 드롭다운 메뉴 스타일 (검정 배경일 때) */
.dropdown-menu {
  background-color: #ffffff;
  color: #000000;
}

/* 드롭다운 항목 텍스트 색상 */
.dropdown-menu .dropdown-item {
  color: #000000;
}

/* 스크롤 후 (밝은 배경일 때) 드롭다운 메뉴 스타일 */
body.scrolled .dropdown-menu {
  background-color: #000000;
  color: #ffffff;
}

/* 스크롤 후 드롭다운 항목 텍스트 색상 */
body.scrolled .dropdown-menu .dropdown-item {
  color: #ffffff;
}

/* 호버 시 강조 효과 */
.dropdown-menu .dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

body.scrolled .dropdown-menu .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 기본 상태 (밝은 배경) */
.dropdown-link {
  color: #000000;
}

/* 스크롤 후 상태 (어두운 배경) */
body.scrolled .dropdown-link {
  color: #ffffff;
}

/* 호버 시 강조 */
.dropdown-link:hover {
  text-decoration: underline;
}

.main-clip {
  height: 60vh;
  position: relative;
}

.sub-clip {
  height: 30vh;
  position: relative;
}

.clip-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 2em;
  text-align: center;
  pointer-events: none;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: italic;
  animation: fadeIn 2s ease-in-out; /* 애니메이션 적용 */
}

#backToTop {
  display: none; /* 기본적으로 숨김 */
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #710900;
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 10px;
}
#backToTop:hover {
  background-color: #555;
}

.clip_img {
  display: block;
}

.scroll-offset {
  scroll-margin-top: 76.8px; /* sticky 메뉴의 높이만큼 조정 */
}

#counter ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
  padding: 0;
  margin: 0;
  text-align: center;
}

#counter li {
  flex: 1;
}

.number {
  font-size: 2rem;
  transition: all 0.3s ease-in-out;
}

.transition {
  transition: background-color 0.3s, color 0.3s;
}

.main-title {
  font-size: 7rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.main-sub-title {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

/* 기본 카드 스타일 */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  overflow: hidden;
  border-radius: 10px;
}

/* .no-effect 클래스가 있는 카드: 효과 제거 */
.card.no-effect {
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* 호버 효과 */
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* .no-effect 카드의 호버 효과 제거 */
.card.no-effect:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* 카드 이미지 */
.card-img-top {
  transition: transform 0.5s ease;
  height: 300px;
  object-fit: cover;
}

/* 호버 시 이미지 확대 */
.card:hover .card-img-top {
  transform: scale(1.05);
}

/* .no-effect 카드의 이미지 확대 제거 */
.card.no-effect:hover .card-img-top {
  transform: none !important;
}

/* 카드 본문 */
.card-body {
  transition: background-color 0.3s ease;
  height: 200px;
  overflow-y: auto; /* 세로 스크롤 생성 */
  padding-right: 10px; /* 스크롤바와 텍스트 간격 확보 */
}

/* 호버 시 배경색 변경 */
.card:hover .card-body {
  background-color: rgba(255, 255, 255, 0.9);
}

/* .no-effect 카드의 배경색 변경 제거 */
.card.no-effect:hover .card-body {
  background-color: inherit !important;
}

/* 카드 텍스트 */
.card-text {
  overflow: auto;
  text-overflow: ellipsis;
  font-size: 1rem;
}

.custom-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  /* hover 효과 없음 */
}

.custom-card-head {
  position: relative;
  height: 180px;
  overflow: hidden;
  padding: 0;
}

.custom-card-head img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.custom-card-title {
  position: relative;
  z-index: 2;
  color: white;
  font-weight: normal;
  padding: 1rem;
  font-size: 1.3rem;
}

.custom-card-text {
  font-size: 1rem;
  color: #000000;
}

.custom-card-body {
  padding: 20px;
  height: 250px;
}

/* 텍스트 숨기기 (왼쪽 밖으로 이동 + 투명)
.custom-card-body {
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  background-color: white;
  padding: 1rem;
  z-index: 1;
  position: relative;
}*/

/* 기본 상태: custom-card-body는 숨김
.custom-card-body {
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
} */

/* lg 이상: hover 시에만 custom-card-body 등장
@media (min-width: 992px) {
  .custom-card:hover .custom-card-body {
    transform: translateX(0);
    opacity: 1;
  }
}*/

/* md 이하: custom-card-body 항상 보이게 
@media (max-width: 991.98px) {
  .custom-card-body {
    transform: translateX(0);
    opacity: 1;
  }
}*/

.swiper {
  padding: 2rem 0;
  position: relative;
}

.swiper-slide {
  display: flex;
  justify-content: center;
}

.logoSwiper,
.logoSwiperReverse {
  width: 100%;
  padding: 20px 0;
}

.swiper-slide-logo {
  min-width: 120px; /* 슬라이드 최소 너비 설정 */
  height: 60px; /* 슬라이드 높이 설정 */
  display: flex;
  align-items: center !important;
  justify-content: center;
  padding: 0 10px; /* 좌우 여백 추가로 겹침 방지 */
  box-sizing: border-box;
}

.swiper-slide-logo img {
  max-height: 40px;
  max-width: 100%; /* 슬라이드 너비를 넘지 않도록 제한 */
  object-fit: contain;
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

.menu-icon-text {
  font-size: 1rem;
}

@media (min-width: 992px) {
  .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    position: absolute;
    right: 0;
    left: auto;
    border: none;
  }

  .nav-item.dropdown .dropdown-menu.show {
    display: block;
    position: absolute;
    right: 0;
    left: auto;
    margin-top: 0;
  }

  .nav-item.dropdown:hover .mega-menu,
  .nav-item.dropdown .mega-menu.show {
    display: block;
    position: absolute;
    border: none;
    white-space: nowrap;
    width: auto;
    min-width: max-content;
    max-width: calc(100vw - 4rem) !important; /* 좌우 여백 2rem씩 확보 */
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    overflow-x: auto;
  }
}

@media (max-width: 992px) {
  .dropdown-menu.show {
    width: 100% !important;
    display: block;
    max-height: 30vh;
    overflow-y: scroll;
  }
}

/* md 이상에서는 왼쪽 정렬 */
@media (min-width: 768px) {
  .clip-text {
    left: 0;
    transform: translateY(-50%);
    text-align: left;
    padding-left: 40px; /* 필요 시 여백 조정 */
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .main-clip,
  .sub-clip {
    height: 40vh;
  }

  .clip_web {
    display: none;
  }
  .clip_mobile {
    display: block;
  }

  p {
    font-size: 1.1rem; /* 모바일에서 폰트 크기 조정 */
  }

  .main-title,
  .main-sub-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
  }

  .card-body {
    transition: background-color 0.3s ease;
    height: 250px;
  }
}
