@charset "utf-8";

@import url(./reset.css);
@import url(./color.css);
@import url(./font.css);
@import url(./component.css);

/* Base & Globals */
html,
body {
  position: relative;
  height: 100%;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%;

  @media (max-width: 1023px) {
    font-size: 54.7%;
  }
}

body {
  font-size: 1rem;
}

.body_hidden {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  touch-action: none;
}

#wrap {
  position: relative;
  background-color: var(--white);
}

/* Containers */
.inner1480 {
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
  @media screen and (max-width: 1480px) {
    padding: 0 20px;
  }
}

.inner1280 {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  @media screen and (max-width: 1280px) {
    padding: 0 20px;
  }
}

.subf {
  font-family: var(--subFont) !important;
}

/* 공통 */
.flex {
  display: flex;
  flex-wrap: wrap;
  &.noWrap {
    flex-wrap: nowrap;
  }
  &.alc {
    align-items: center;
  }
  &.jcCenter {
    justify-content: center;
  }
  &.jcBetween {
    justify-content: space-between;
  }
  &.gap10 {
    gap: 1rem;
  }
}

/* Header */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  transition: all 0.5s;

  &::before {
    content: "";
    display: block;
    position: absolute;
    left: 50%;
    top: 120px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    width: 0;
    height: 1px;
    z-index: 4;
    transition: all 0.2s;
    @media screen and (max-width: 1023px) {
      display: none;
    }
  }

  &.over::before {
    background: #c4c4c4;
    width: 100%;
    transition: all 0.3s 0.2s;
  }

  &.over_all {
    &::before {
      display: none;
    }
    &::after {
      content: ""; /* 기존 코드에 생략되었으나 after 사용 시 필요 */
      opacity: 1;
      background: var(--white);
      z-index: 99990;
    }
    h1 {
      z-index: 99999;
    }
  }

  h1 {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    height: 120px;
    @media screen and (max-width: 760px) {
      height: 80px;
    }

    a {
      display: block;
      .svg {
        width: 174px;
        height: auto;
      }
      svg path {
        transition: all 0.4s;
      }
      @media screen and (max-width: 760px) {
        svg {
          width: 50px;
          height: auto;
        }
      }
    }
  }

  &.on,
  &.over,
  &.over_all {
    svg .logo-1 {
      fill: var(--primary);
    }
  }

  /* Navigation */
  #navi {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    @media screen and (max-width: 1023px) {
      display: none;
    }

    #gnb {
      position: relative;

      .line {
        position: absolute;
        bottom: -6px;
        opacity: 0;
        transition: all 0.3s;

        &::before {
          content: "";
          display: block;
          position: absolute;
          left: 50%;
          bottom: 2px;
          transform: translateX(-50%);
          width: 1px;
          height: 30px;
          background: #c4c4c4;
        }

        &::after {
          content: "";
          display: block;
          position: absolute;
          left: 50%;
          bottom: 0;
          transform: translateX(-50%);
          width: 5px;
          height: 5px;
          background: #fff;
          border: 3px solid var(--primary);
          border-radius: 50%;
          /* width: 0;
          height: 0;
          border-style: solid;
          border-width: 0px 5px 10px 5px;
          border-color: transparent transparent var(--primary) transparent; */
        }
      }

      & > ul {
        display: flex;
        text-align: center;

        & > li {
          position: relative;
          transition: all 0.5s;
          height: 120px;
          display: flex;
          justify-content: center;
          align-items: center;
          padding: 0 40px;

          @media screen and (max-width: 1560px) {
            padding: 0 35px;
          }

          & > a {
            position: relative;
            text-wrap: nowrap;
            font-family: var(--subFont);
            color: var(--white);
            font-size: 20px;
            font-weight: 400;
            line-height: 1.3;
            transition: all 0.3s;
          }

          .subDepth {
            z-index: -11;
            opacity: 0;
            visibility: hidden;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            top: 120px;
            padding-top: 40px;
            padding-bottom: 50px;

            & > ul {
              position: relative;
              display: flex;
              gap: 0 80px;
              width: 100%;
              @media screen and (max-width: 1560px) {
                gap: 0 60px;
              }
              @media screen and (max-width: 1440px) {
                gap: 0 40px;
              }

              & > li {
                & > a {
                  position: relative;
                  font-family: var(--mainFont);
                  font-size: 18px;
                  color: #222;
                  font-weight: 500;
                  line-height: 1.3;
                  text-wrap: nowrap;
                  transition: all 0.3s;

                  &:hover {
                    color: var(--primary);
                  }
                }
                &.over > a {
                  color: var(--primary);
                }
                &.mo {
                  display: none;
                }
              }
            }
          }

          &:first-child > .subDepth {
            left: 40px;
            transform: translateX(0);
          }
          &:nth-child(2) > .subDepth {
            left: -100px;
            transform: translateX(0);
          }

          &.on > .subDepth {
            opacity: 1;
            visibility: visible;
            z-index: 2;
            & > ul {
              animation: gab_over 0.4s 0.1s both;
            }
          }
        }
      }
    }
  }

  &.over {
    .gnb_bg {
      opacity: 1;
      visibility: visible;
      z-index: 1;
    }
    #navi #gnb .arr {
      opacity: 1;
    }
    #navi #gnb > ul > li > a {
      color: rgba(17, 17, 17, 0.3);
    }
  }

  &.on #navi #gnb > ul > li > a,
  #navi #gnb > ul > li.on > a {
    color: #111;
  }

  .gnb_bg {
    visibility: hidden;
    height: 120px;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 1);
    transition: all 0.3s;
    z-index: 1;
  }

  /* Top Menu Items */
  .top-menu {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    height: 120px;
    @media screen and (max-width: 1560px) {
      right: 20px;
    }
    @media screen and (max-width: 760px) {
      height: 80px;
    }

    & > div {
      margin-left: 40px;
      @media screen and (max-width: 1440px) {
        margin-left: 30px;
      }
      @media screen and (max-width: 760px) {
        margin-left: 17px;
      }
    }
  }

  .recruit-btn {
    position: relative;
    z-index: 10;
    @media screen and (max-width: 760px) {
      display: none;
    }
    a {
      position: relative;
      font-size: 17px;
      color: var(--white);
      display: block;
      padding: 10px 20px;
      border: 1px solid var(--primary);
      border-radius: 40px;
      overflow: hidden;
      transition: all 0.5s ease-in-out;

      &::before {
        content: "";
        position: absolute;
        left: -100px;
        top: 0;
        width: 100%;
        height: 100%;
        margin-left: -1px;
        margin-bottom: -1px;
        border: 1px solid transparent;
        background-color: var(--primary);
        transition: all 0.3s linear;
        border-radius: 40px;
        z-index: -1;
      }

      @media (hover: hover) {
        &:hover {
          color: var(--white);
          &::before {
            left: 0;
          }
        }
      }
    }
  }

  .allBox {
    display: block;
    @media screen and (max-width: 1023px) {
      display: block;
    }
  }

  .allmenu {
    position: relative;
    z-index: 100;
    @media screen and (max-width: 760px) {
      margin-top: -4px;
    }

    a {
      position: relative;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      @media screen and (max-width: 760px) {
        width: 26px;
        height: 26px;
      }

      &::before,
      &::after {
        content: "";
        display: block;
        background-color: var(--white);
        position: absolute;
        transition: all 0.4s;
      }

      &::before {
        width: 100%;
        height: 2px;
        right: 0;
        top: 5px;
        @media screen and (max-width: 760px) {
          top: 3px;
        }
      }
      &::after {
        width: 50%;
        height: 2px;
        left: 0;
        bottom: 5px;
        @media screen and (max-width: 760px) {
          bottom: 3px;
        }
      }

      span {
        position: relative;
        display: block;
        width: 70%;
        height: 2px;
        background-color: var(--white);
        transition: all 0.2s ease-in-out;
      }

      &:hover {
        span {
          background-color: var(--primary);
          width: 50%;
        }
        &::before,
        &::after {
          background-color: var(--primary);
          width: 100%;
        }
      }
    }
  }

  &.on .allmenu {
    span,
    a::before,
    a::after {
      background-color: var(--black);
    }
  }
}

/* All Menu Overlay */
#allmenuBox {
  /* display: block; */

  @media screen and (min-width: 1023px) {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    /* background: var(--primary); */
    /* background: rgba(138, 0, 255, 0.7); */
    background: linear-gradient(
      360deg,
      rgba(138, 0, 255, 0.5) 0%,
      rgba(138, 0, 255, 0.8) 55%,
      rgba(138, 0, 255, 1) 100%
    );
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: right 0.5s ease-in-out;
    .menuBox {
      padding: 20px 20px 20px 200px;
      > ul {
        border-left: 1px solid rgba(255, 255, 255, 0.15);
      }
    }

    &.on {
      right: 0;
      .menuBox > ul > li > a {
        transform: translateY(0);
        opacity: 1;
        color: var(--white);
      }
      .menuBox > ul > li {
        /* 2. 애니메이션 적용 */
        opacity: 0; /* 시작 전에는 숨김 */
        animation: menuItemUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;

        /* 3. 순차적 지연 시간 (Staggered Delay) */
        &:nth-child(1) {
          animation-delay: 0.1s;
        }
        &:nth-child(2) {
          animation-delay: 0.2s;
        }
        &:nth-child(3) {
          animation-delay: 0.3s;
        }
        &:nth-child(4) {
          animation-delay: 0.4s;
        }
        &:nth-child(5) {
          animation-delay: 0.5s;
        }
        /* 메뉴 개수가 더 많다면 숫자를 늘려주세요 */
      }
    }
    &.off {
      .menuBox > ul > li {
        opacity: 0;
        animation: none;
      }
    }
  }

  @media screen and (max-width: 1023px) {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s 0.1s ease-in-out;
    z-index: -99;

    &.on {
      background: var(--primary);
      z-index: 10000;
      opacity: 1;
      visibility: visible;
    }
  }

  .top {
    position: relative;
    z-index: 10;
    justify-content: space-between;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 40px 20px 0 200px;
    margin-bottom: 20px;
    @media screen and (max-width: 1023px) {
      padding-left: 20px;
    }

    h2 {
      color: var(--white);
      font-size: 64px;
      font-weight: 700;
      letter-spacing: 0.4em;
      opacity: 0;
      transition: all 1.2s;
      @media screen and (max-width: 760px) {
        font-size: 45px;
      }
      @media screen and (max-width: 480px) {
        font-size: 32px;
      }
    }

    .menuClose {
      border: none;
      background: none;
      outline: none;
      width: 50px;
      height: 50px;
      border: 1px solid rgba(255, 255, 255, 0.5);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.4s;

      @media screen and (max-width: 760px) {
        width: 30px;
        height: 30px;
      }

      i {
        background: url(../images/common/ico_close.svg) center / 100% no-repeat;
        width: 36px;
        height: 36px;
        transition: all 0.4s;
        @media screen and (max-width: 760px) {
          font-size: 16px;
        }
      }

      &:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--white);
        i {
          color: var(--primary);
        }
      }
    }
  }

  &.on .top h2 {
    letter-spacing: 0;
    opacity: 1;
  }

  .menuBox {
    @media screen and (max-width: 1023px) {
      position: absolute;
      height: calc(100vh - 160px);
      overflow: auto;
      left: 0;
      width: 100%;
      padding: 20px 20px 0;
    }
    @media screen and (max-width: 760px) {
      height: calc(100vh - 120px);
    }

    & > ul {
      position: relative;
      border-left: 1px solid rgba(255, 255, 255, 0.15);
      padding: 20px 40px;
      @media screen and (max-width: 760px) {
        padding: 20px;
      }

      & > li {
        position: relative;
        text-align: left;
        margin-top: 0;

        &:not(:last-child) {
          margin-bottom: 40px;
          @media screen and (max-width: 760px) {
            margin-bottom: 20px;
          }
        }

        & > a {
          position: relative;
          color: var(--white);
          font-weight: 700;
          font-size: 30px;
          line-height: 1;
          display: block;
          transition: all 0.8s;
          transform: translateY(-60px);
          opacity: 0;
          @media screen and (max-width: 760px) {
            font-size: 24px;
          }
        }

        .subDepth {
          position: relative;
          display: none;

          & > ul {
            padding-top: 20px;
            @media screen and (max-width: 760px) {
              padding-top: 15px;
            }

            & > li > a {
              padding: 5px 0;
              display: inline-block;
              position: relative;
              color: rgba(255, 255, 255, 0.8);
              font-weight: 500;
              font-size: 18px;
              line-height: 1.3;
              transition: all 0.3s;
              @media screen and (max-width: 760px) {
                font-size: 16px;
              }
            }
          }
        }

        &.hover {
          & > a {
            color: var(--white);
          }
          .subDepth {
            display: block;
          }
        }
      }
    }
  }

  &.on .menuBox > ul > li > a {
    transform: translateY(0);
    opacity: 1;
  }
}

footer {
  background-color: #252525;
  padding: 60px 20px 70px;
  a,
  li,
  .footer_copyright {
    color: var(--white);
    font-size: 1.7rem;
    font-weight: 300;
    @media screen and (max-width: 1400px) {
      font-size: 1.6rem;
    }
  }
  .footer_wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    /* 태블릿 및 모바일 (1024px 이하) */
    @media screen and (max-width: 1024px) {
      flex-direction: column; /* 세로로 쌓기 */
      text-align: center; /* 텍스트 중앙 정렬 */
      gap: 40px;
    }
    h1 {
      .svg {
        width: 215px;
        height: auto;
        @media screen and (max-width: 760px) {
          width: 160px;
        }
      }
    }
    .footer_info {
      ul {
        display: flex;
        justify-content: flex-start;
        gap: 25px;
        @media screen and (max-width: 1024px) {
          justify-content: center;
          flex-wrap: wrap;
        }
      }
      .privacy {
        margin-bottom: 15px;
        li {
          position: relative;
          &:not(:last-child)::after {
            content: "";
            position: absolute;
            right: -13px;
            top: 50%;
            transform: translateY(-50%);
            width: 1px;
            height: 12px;
            background: rgba(255, 255, 255, 0.3);
          }
        }
      }
      .address {
      }
    }
    .footer_copyright {
      font-size: 14px;
      color: rgba(255, 255, 255, 0.6);
      @media screen and (max-width: 1024px) {
        order: 3;
      } /* 모바일에서 맨 아래로 */
    }
    .sns_wrap {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      @media screen and (max-width: 1024px) {
        order: 2;
      } /* 모바일에서 정보 위로 */
      .sns {
        display: block;
        /* margin-left: 1.5rem; */
        width: 3.4rem;
        height: 3.4rem;
        overflow: hidden;
        text-indent: -9999px;
        font-size: 0rem;
        background: rgba(255, 255, 255, 0.1) no-repeat center / 3rem auto;
        border-radius: 50%;
        &:hover {
          background-color: var(--primary);
        }
        &.youtube {
          background-image: url(../images/common/sns-youtube.svg);
        }
        &.blog {
          background-image: url(../images/common/sns-naver.svg);
        }
      }
    }
  }
}

header.on .recruit-btn a,
header.over .recruit-btn a {
  color: var(--black);
  /* border-color: var(--black); */
}

header.on .allmenu a::before,
header.on .allmenu a::after,
header.on .allmenu a span,
header.over .allmenu a::before,
header.over .allmenu a::after,
header.over .allmenu a span {
  background-color: var(--black);
}

/* Animations */
@keyframes gab_over {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes menuItemUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* table */
/* 독립 요소 스타일 */
table caption {
  position: relative;
  height: 0;
  font-size: 0;
  line-height: 0;
}

/* 기본 테이블 스타일 */
.table-responsive {
  width: 100%;
  overflow-x: auto; /* 가로 스크롤 허용 */
  -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
  margin-bottom: 20px;

  /* 아이폰/사파리 스크롤바 스타일 강제 적용 */
  &::-webkit-scrollbar {
    -webkit-appearance: none; /* 기본 외형 제거 */
    height: 6px;
    display: block; /* 모바일 사파리에서 표시되도록 설정 */
  }

  &::-webkit-scrollbar-thumb {
    background-color: var(--primary); /* 기본 컬러 */
    border-radius: 10px;
    /* 배경과 대비를 주어 아이폰에서 더 잘 보이게 설정 */
    border: 1px solid #ffffff;
  }

  &::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .tblBasic {
    width: 100%;
    min-width: 1000px; /* 1023px 이하에서도 테이블 형태를 유지하기 위한 최소 너비 */
    border-top: 2px solid var(--primary);
    border-bottom: 1px solid #ccc;

    & th,
    & td {
      padding: 15px 10px;
      border-left: 1px solid #eee;
      border-bottom: 1px solid #eee;
      vertical-align: middle;
      font-size: 1.8rem;
      text-align: center;
      white-space: normal;
      word-wrap: break-word;

      &:first-child {
        border-left: none;
      }
      &.trw {
        border-right: 1px solid #ccc;
      }
    }

    & th {
      background: #f8f8f8;
      color: var(--gray50);
      font-weight: 500;
      border-bottom: 1px solid #ccc;
    }

    & td {
      color: #666;
      font-weight: 300;
      line-height: 1.5;
    }

    /* 1023px 이하 모바일 환경 특화 설정 */
    @media screen and (max-width: 1023px) {
      min-width: 800px; /* 모바일에서 너무 길지 않게 조정 */

      & th,
      & td {
        padding: 12px 8px;
        font-size: 1.6rem;
      }
    }
  }
}
