/* ========================================
   SUB/Text_ani_up - 서브 상단 텍스트 올라오기 애니메이션
   ======================================== */

/* === 뱃지 (flow 밖으로 빼기) === */
.Text_ani_up.admin_div_grid .grid_layout_badge { z-index: 10; position: absolute; top: 5px; left: 5px; }

/* === 외곽 컨테이너 === */
.Text_ani_up .subbgtopimg {
  width: 100%; float: left;
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
}

/* PC */
@media only all and (min-width:768px) {
  .Text_ani_up .subbgtopimg { height: calc(var(--subtop-h) - 30px); }
}
/* 태블릿 */
@media all and (max-width:1560px) and (min-width:768px) {
  .Text_ani_up .subbgtopimg { height: 300px; }
}
/* 모바일 */
@media only all and (max-width:767px) {
  .Text_ani_up .subbgtopimg { height: 200px; margin-top: 0 !important; }
}


/* === 배경 이미지 === */
.Text_ani_up .subbgtopimg .wg_img1 {
  width: 100%; height: 100%;
  position: absolute; top: 0; left: 0;
  z-index: 0; overflow: hidden;
}
.Text_ani_up .subbgtopimg .wg_img1::before {
  content: "";
  width: 100%; height: 80px;
  position: absolute; top: -80px; left: 0;
  background-color: var(--primary-opacity80);
  z-index: 1;
}

/* PC 이미지 */
@media only all and (min-width:768px) {
  .Text_ani_up .subbgtopimg .wg_img1 img {
    height: auto; width: 2560px;
    position: absolute; top: 0; left: 50%; margin-left: -1280px;
    animation: txtAniUp_bgIn 2s forwards;
  }
}
@media all and (max-width:1800px) and (min-width:768px) {
  .Text_ani_up .subbgtopimg .wg_img1 img {
    width: 1960px; margin-left: -1000px;
  }
}
/* 모바일 이미지 */
@media only all and (max-width:767px) {
  .Text_ani_up .subbgtopimg .wg_img1 { background-color: #000; }
  .Text_ani_up .subbgtopimg .wg_img1::before { top: -20px; }
  .Text_ani_up .subbgtopimg .wg_img1 img {
    height: auto; width: 250%;
    position: absolute; top: 0; left: 30%; margin-left: -100%;
    animation: txtAniUp_bgIn_m 2s forwards;
  }
}

@keyframes txtAniUp_bgIn {
  from { opacity: 0; transform: translateY(-60px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes txtAniUp_bgIn_m {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 0.6; transform: translateY(0); }
}


/* === inner 컨테이너 === */
.Text_ani_up .subbgtopimg .contents-container {
  position: relative;
  z-index: 1;
  float: left;
  width: 100%;
}
.Text_ani_up .subbgtopimg .contents-container .wg_boxin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
@media only all and (min-width:768px) {
  .Text_ani_up .subbgtopimg .contents-container { padding-top: 80px; padding-bottom: 80px; height: 100%; }
}
@media only all and (max-width:767px) {
  .Text_ani_up .subbgtopimg .contents-container { padding-top: 40px; padding-bottom: 40px; height: 100%; }
}


/* === 텍스트 박스 === */
.Text_ani_up .wg_boxin {
  width: 100%; float: left;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.Text_ani_up .wg_boxin.ready {
  opacity: 1;
}

/* wg_tx1, wg_tx2 - 올라오기 애니메이션 대상 */
.Text_ani_up .wg_tx1,
.Text_ani_up .wg_tx2 {
  width: 100%; float: left;
  overflow: hidden;
  position: relative;
}

/* PC 폰트 */
@media only all and (min-width:768px) {
  .Text_ani_up .wg_tx1 .intx,
  .Text_ani_up .wg_tx2 .intx {
    width: 100%; float: left;
    color: #fff;
    font-size: calc(var(--tit-md-size) * 0.9);
    font-weight: 800;
    line-height: 130%;
  }
}
/* 모바일 폰트 */
@media only all and (max-width:767px) {
  .Text_ani_up .wg_tx1 .intx,
  .Text_ani_up .wg_tx2 .intx {
    width: 100%; float: left;
    color: #fff;
    font-size: calc(var(--tit-md-size) * 0.7);
    font-weight: 800;
    line-height: 130%;
    letter-spacing: -1px;
  }
}

/* wg_tx3 - 설명 텍스트 (일반 페이드인) */
.Text_ani_up .wg_tx3 {
  width: 100%; float: left;
  color: #fff;
  line-height: 130%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}
.Text_ani_up .wg_boxin.ready .wg_tx3 {
  opacity: 1;
  transform: translateY(0);
}

@media only all and (min-width:768px) {
  .Text_ani_up .wg_tx3 { margin-top: 30px; }
}
@media only all and (max-width:767px) {
  .Text_ani_up .wg_tx3 { margin-top: 10px; font-size: calc(var(--tit-mds-size) * 0.8); }
}


/* === 단어 올라오기 애니메이션 === */
.Text_ani_up .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-right: 2px;
}
.Text_ani_up .word.animate {
  opacity: 1;
  transform: translateY(0);
}

/* 하이라이트 글자 */
.Text_ani_up .highlight-char {
  color: var(--primary);
}
