/* nav */

#mainHeader {
  position: fixed;
  background-color: transparent;
  transition: background-color 0.3s ease;
  z-index: 999;
}

#mainHeader.scrolled {
  background-color: #fff;
}
.nav-menu-section {
  display: flex;
  gap: 30px;
  font-size: 1.2rem;
  font-weight: 700;
  height: 100%;
}
.nav-menu-section a:hover,
.nav-menu-section a:focus {
  color: var(--main-color);
}

.menu-item {
  position: relative;
  height: 100%;
}
.menu-item > a {
  height: 100%;
  align-content: center;
  padding: 20px;
}

.nav-depth2 {
  display: none;
  position: absolute;
  width: 150%;
  top: calc(100% - 20px);
  left: -25%;
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  border-top: 3px solid var(--main-color);
  z-index: 10;
}
.nav-depth2 > a {
  font-size: 1rem;
  font-weight: 400;
  width: 100%;
  text-align: center;
}

.menu-item:hover .nav-depth2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 24px;
}
.sitemap-open-btn > img {
  padding: 16px;
  width: 60px;
  height: 60px;
}
/* --nav */
/* sitemap */

.sitemap-area {
  position: fixed;
  top: 0;
  left: 0;
  background-color: #152352;
  opacity: 0.9;
  width: calc(100vw - var(--scrollbar-width, 17px));
  height: 100vh;
  z-index: 99;
  display: none;
  justify-content: space-between;
  flex-direction: row-reverse;
}

.sitemap-menu-group {
  display: flex;
  width: 90%;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 10%;
}

.sitemap-menu-group * {
  color: #fff !important;
}
.sitemap-item > .depth1 {
  margin: 30px;
  padding: 10px;
  font-size: 2rem;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}
.sitemap-item > .depth1:hover {
  border-bottom: 3px solid var(--primary-color);
}
.sitemap-depth2 {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sitemap-depth2 > .depth2 {
  font-size: 1.2rem;
  padding: 20px;
  width: 100%;
  text-align: center;
  transition: all 0.2s ease;
}
.sitemap-depth2 > .depth2:hover {
  background-color: var(--main-color);
  opacity: 1;
}
.sitemap-btn-section {
  height: 100%;
  display: flex;
}

.sitemap-close-btn {
  width: 90px;
  height: 90px;
  background-color: rgb(0, 0, 0, 0.9);
}

.sitemap-btn-section > .user-section {
  display: none;
}
/* --sitemap */
.carousel-title {
  padding-top: 160px;
  padding-bottom: 60px;
}

section {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.carouselImg-section {
  position: absolute;
  left: 0;
  width: 100vw;
  height: auto; /* 이 경우 height는 자식 요소인 img가 결정 */
  z-index: -999;
  overflow: hidden;
}

.carouselImg-section > img {
  width: 100%;
  object-fit: cover;
  object-position: center top;
}

.carouselImg-section > .m-main-img {
  display: none;
  min-height: 400px;
}

.carouselImg-section > .main-img {
  min-height: 520px;
}

.main-box-section {
  background-color: #fff;
  max-width: var(--max-width);
  overflow: hidden;
  padding: 20px 24px 60px;
  border-radius: 45px 45px 45px 45px;
  border: 1px solid #ddd;
}
.main-board-section {
  display: flex;
  background-color: #fff;
  overflow: hidden;
}
.board-notice,
.board-freeBoard, 
.board-event {
  width: 33%;
  padding: 10px;
}
.board-date {
  min-width: 102px;
  text-align: right;
}
.main-link-section {
  display: flex;
  padding: 30px;
  margin: 24px 0;
  background-color: var(--main-color);
  color: #fff;
  justify-content: space-between;
}
.main-link-section * {
  background-color: var(--main-color);
  color: #fff;
}

.board-list {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
}

.link-area {
  display: flex;
  margin-bottom: 10px;
}

.link-area * {
  transition: all 0.2s ease;
}

.link-area:hover .title-m {
  transform: scale(1.05);
}

.img-check {
  padding-top: 8px;
  padding-right: 8px;
}

.gallery-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-area > img {
  border-radius: 14px;
  width: 190px;
  height: 180px;
  object-fit: cover;
}
/* footer */

.footer-upper {
  align-content: center;
  height: 80px;
  border-bottom: 1px solid #777;
}
.footer-logo {
  flex: 6;
}
.footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 4;
}

.summery-area > div {
  padding: 0 8px;
}

.today-visiter {
  border-right: 1px solid #fff;
}

.footer-policy > a {
  font-size: 0.8rem;
  padding: 0 8px;
  color: #ddd;
}

.footer-bottom {
  padding: 12px;
}

.footer-desc {
  font-size: 0.9rem;
  color: #ddd;
  line-height: 1.3rem;
}

/* 반응형 */

@media (max-width: 1024px) {
  .nav-menu-section {
    display: none;
  }
  .user-section {
    display: none;
  }
}
@media (max-width: 768px) {
  .carouselImg-section > .m-main-img {
    display: block;
  }
  .carouselImg-section > .main-img {
    display: none;
  }
  .carousel-title {
    padding-top: 120px;
    padding-bottom: 40px;
  }

  .sitemap-area {
    width: 70%;
    right: 0;
    left: auto;
    background-color: #fff;
    opacity: 1;
    overflow-y: scroll;
    flex-direction: column;
    justify-content: flex-start;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
  }
  .sitemap-menu-group * {
    color: #000 !important;
  }

  .sitemap-menu-group {
    width: 100%;
    flex-direction: column;
    padding: 0;
  }
  .sitemap-btn-section {
    justify-content: space-between;
    height: 50px;
    background-color: var(--main-color);
  }

  .sitemap-btn-section > .user-section {
    display: flex;
    width: 100%;
    padding: 0;
    justify-content: space-evenly;
    color: #fff;
  }
  .sitemap-close-btn {
    width: 60px;
    height: 50px;
    background-color: transparent;
  }
  .sitemap-close-btn > img {
    width: 24px;
    height: 24px;
  }
  .sitemap-item {
    width: 100%;
  }
  .sitemap-item > .depth1 {
    margin: 0;
    padding: 20px;
    font-size: 1rem;
    width: 100%;
    border-bottom: 1px solid #ddd;
    position: relative;
    font-weight: 400;
  }
  .sitemap-depth2 {
    display: none;
  }
  .sitemap-item.active .sitemap-depth2 {
    display: flex;
  }
  .sitemap-depth2 > .depth2 {
    font-size: 0.9rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
  }
  .sitemap-item > .depth1::after {
    content: "";
    background-image: url("../img/arrow-up.png");
    position: absolute;
    width: 24px;
    height: 24px;
    right: 20px;
    top: 50%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translateY(-50%) rotate(0deg);
  }
  .sitemap-item.active > .depth1::after {
    transform: translateY(-50%) rotate(180deg);
  }
  .sitemap-overlay {
    position: fixed;
    display: none;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 90;
  }
  /* 반응형 메인 섹션 */
  .main-board-section {
    flex-direction: column;
  }
  .board-notice,
  .board-freeBoard,
  .board-event {
    width: 100%;
  }

  .gallery-area > img {
    border-radius: 14px;
    width: 150px;
    height: 140px;
    object-fit: cover;
  }
  .main-link-section {
    flex-direction: column;
  }
  .link-info-group > .description-m {
    display: none;
  }
  /* 반응형 footer */
  .footer-upper {
    height: 180px;
  }
  .footer-upper > .flex.justify-between {
    flex-direction: column;
    height: 100%;
  }
  .footer-info {
    flex-direction: column;
    justify-content: space-evenly;
    flex: 2;
  }
  .footer-logo {
    flex: 2;
    align-content: center;
    text-align: center;
  }
}
