/* =========================================================
 1. 폰트 및 웹 표준 리셋
 ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* 가로 넘침 차단. 스크롤 인 연출이 요소를 translate 로 오른쪽에 대기시켜 두는데
   (.works-content-item 이 .show 전까지 +200px), body 의 overflow-x:hidden 만으로는
   문서가 그만큼 옆으로 스크롤되는 것을 못 막는다 — 실제로 dap 이 120px 밀렸다.
   clip 은 스크롤 컨테이너를 만들지 않고 잘라내기만 한다(hidden 은 컨테이너를 만들어
   position:sticky 를 죽인다 — src/styles/mobile.css 에 같은 메모가 있다). */
html {
  overflow-x: clip;
}

ul,
li,
dl,
dt,
dd {
  list-style: none;
  margin: 0;
  padding: 0;
}
body {
  font-family: "MICEGothic", sans-serif;
  word-break: keep-all;
  overflow-x: hidden;
}

@font-face {
  font-family: "MICEGothic";
  src: url("https://cdn.jsdelivr.net/gh/fontbee/font@main/Micecontents/MICEGothic.woff2")
    format("woff2");
  font-weight: 400;
  font-style: normal;
}

/* 시각장애인용 숨김 텍스트 처리 */
.blind {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  margin: -1px;
}

/* PC / Mobile 분기 클래스 (Vue의 isPotable 스크립트 완벽 대체) */
.only-pc {
  display: block;
}
.only-mobile {
  display: none !important;
}
.br_pc {
  display: block;
}

@media (max-width: 1023px) {
  .only-pc {
    display: none !important;
  }
  .only-mobile {
    display: block !important;
  }
  span.only-mobile,
  br.only-mobile,
  i.only-mobile {
    display: inline-block !important;
  }
  .br_pc {
    display: none !important;
  }
}

/* =========================================================
 2. 상단 공통 타이틀 영역 (WorkContentCommon 임시 대응)
 ========================================================= */
.works-image img {
  width: 100%;
  display: block;
}
.works-slide-show {
  padding: 60px 5%;
  background: #f8f8f8;
}
.works-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.works-box {
  flex: 1;
  min-width: 300px;
}
.work-title {
  font-size: 40px;
  font-weight: bold;
  margin-bottom: 10px;
}
.work-subtitle {
  font-size: 20px;
  color: #666;
  margin-bottom: 20px;
}
.work-description-key {
  display: block;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 8px;
}
.work-description-value {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}
.sub-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.sub-box {
  flex: 1;
  min-width: 150px;
}

/* =========================================================
 3. 신한투자증권 본문 공통 CSS
 ========================================================= */
.work-container .works-content {
  margin: 0;
}
.work-container img {
  width: 100%;
}
.works-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 176px 24px;
}
.works-desc {
  margin: 0 auto;
  max-width: 1184px;
  width: 100%;
}

.works-desc-title {
  font-size: 40px;
  font-weight: bold;
  line-height: 1.3;
  color: #191919;
  margin-bottom: 20px;
}
.works-desc-text {
  font-size: 20px;
  line-height: 1.6;
  color: #191919;
  opacity: 0.8;
}

.works-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.works-figure-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 공통 페이드인 & 슬라이드 업 애니메이션 (인라인 변수 --delay 적용) */
.works-content [style*="--delay"],
.works-content [style*="--delayImg"] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}
.works-content.show [style*="--delay"] {
  opacity: 0.8;
  transform: translateY(0);
  transition-delay: var(--delay);
}
.works-content.show [style*="--delayImg"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: var(--delayImg);
}

/* ========================= SECTION 01 ========================= */
.section01 {
  background-color: #1b2042;
  padding-bottom: 196px;
}
.section01 .works-desc-title {
  color: #fff;
}
.section01 .works-desc-text {
  color: #fff;
}
.section01 .works-figure {
  margin: 148px auto 0;
  max-width: 1184px;
  width: 100%;
}

@media (max-width: 767px) {
  .section01 .works-figure {
    margin-top: 40px;
    max-width: 238px;
  }
}

/* ========================= SECTION 02 ========================= */
.section02 {
  background-color: #fff;
}
.section02 .works-figure {
  width: 100%;
}
@media (min-width: 768px) {
  .section02 .works-figure-content {
    max-width: 1280px;
    margin: 0 auto;
    gap: 16px;
    align-items: flex-start;
  }
  .section02 .works-figure-content li:first-of-type {
    margin-top: 93px;
  }
  .section02 .works-figure-content li:last-of-type {
    margin-top: 34px;
  }
}

/* ========================= SECTION 03 ========================= */
.section03 {
  background-color: #2A3FEC;
}
.section03 .works-desc {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
}
.section03 .works-desc-title {
  color: #fff;
  min-width: 424px;
  text-align: left;
  margin: 0;
}
.section03 .works-desc-text {
  color: #fff;
  text-align: left;
  opacity: 0.8;
}

/* PC 배치. ⚠️ 경계가 768 이면 안 된다 — .only-pc/.only-mobile 스와핑과
   .works-section 여백 재정렬이 1023 에서 갈리므로, 768~1023 구간에서
   "모바일 이미지에 PC 의 translateX(±394px)" 가 걸려 카드가 화면 밖으로 나간다. */
@media (min-width: 1024px) {
  .section03 .works-figure {
    margin: 100px auto 0;
    opacity: 0;
    transform: translateY(200px);
    transition:
      transform 0.5s ease-in-out,
      opacity 0.5s ease-in-out;
  }
  .section03 .works-figure-content {
    max-width: 1158px;
    gap: 24px;
  }
  .section03 .works-figure-content li {
    transition: transform 0.75s ease-in-out;
    transition-delay: 0.5s;
  }
  .section03 .works-figure-content li img {
    transition: unset !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .section03 .works-figure-content .figure-cms01 {
    transform: translateX(394px);
  }
  .section03 .works-figure-content .figure-cms03 {
    transform: translateX(-394px);
  }
}

.works-content.show .section03 .works-figure {
  opacity: 1;
  transform: translateY(0);
}
@media (min-width: 1024px) {
  .works-content.show .section03 .works-figure-content .figure-cms01,
  .works-content.show .section03 .works-figure-content .figure-cms03 {
    transform: translateX(0);
  }
}

/* 모바일 CMS 카드 캐러셀 (3단 자동 슬라이드, 가운데 정렬).
   카드는 240×346 고정 — 모바일 원본(720×1038)과 같은 비율이라 늘어나지 않는다.
   ⚠️ 폭·이동량을 뷰포트(vw)로 잡으면 안 된다. 이 슬라이더의 "창"은 뷰포트가 아니라
   .pd-secs(좌우 16px) 안쪽의 .works-section 이다. 예전 값(카드 66.66vw / 트랙 300vw)이
   어긋난 이유가 이것이고, 거기에 .works-section 의 align-items:center 가 300vw 트랙을
   가운데로 밀어 첫 카드가 화면 왼쪽 밖(x=-375px)에 서 있었다.
   창은 파란 배경(.section03) 끝까지 넓힌다 — 좌우 패딩 32px 을 음수 마진으로 되돌리는데,
   안 되돌리면 창이 64px 좁아져서 2번 카드가 가운데 왔을 때 1·3번이 3.5px 밖에 안 보인다.
   (음수 마진이 먹는 건 .works-section 이 align-items:center 라 마진 박스 기준으로
   가운데 정렬하기 때문. 좌우 패딩 값을 바꾸면 --sec-pad-x 도 같이 고칠 것.) */
@media (max-width: 1023px) {
  .section03 .works-figure {
    --sec-pad-x: 32px; /* .works-section 의 좌우 패딩과 같아야 한다 */
    --card-w: 240px;
    --card-h: 346px;
    --slider-gap: 16px;
    --slider-step: calc(var(--card-w) + var(--slider-gap));
    /* n 번째 카드를 창 한가운데 놓는 트랙 위치 */
    --slider-home: calc(50% - var(--card-w) / 2);
    margin: 40px calc(var(--sec-pad-x) * -1) 0;
    width: calc(100% + var(--sec-pad-x) * 2);
    overflow: hidden;
  }
  .section03 .works-figure-content {
    position: relative;
    left: var(--slider-home);
    /* 트랙 폭 = 창 폭. left 의 50% 와 창이 같은 기준을 보게 하려고 100% 로 둔다
       (카드는 이 폭을 넘겨 흘러나가고, 넘친 만큼은 창이 잘라낸다). */
    width: 100%;
    display: flex;
    /* 공통 .works-figure-content 의 justify-content:center 를 끈다.
       켜져 있으면 창보다 넓은 트랙이 절반만큼 왼쪽으로 밀린다. */
    justify-content: flex-start;
    align-items: flex-start;
    gap: var(--slider-gap);
    animation: 9s slider infinite;
    animation-play-state: paused;
  }
  .section03 .works-figure-content:hover {
    animation-play-state: paused;
  }
  .section03 .works-figure-content li {
    flex: 0 0 var(--card-w);
  }
  .section03 .works-figure-content li img {
    width: var(--card-w);
    height: var(--card-h);
    object-fit: cover;
  }
  /* 매 정지 구간마다 그 카드가 창 한가운데 — 2번일 때 1·3번이 좌우로 걸쳐 보인다. */
  @keyframes slider {
    0%,
    30% {
      left: var(--slider-home);
    }
    33%,
    63% {
      left: calc(var(--slider-home) - var(--slider-step));
    }
    66%,
    95% {
      left: calc(var(--slider-home) - var(--slider-step) * 2);
    }
    100% {
      left: var(--slider-home);
    }
  }
  .works-content.show .section03 .works-figure-content {
    animation-play-state: running;
  }
}

/* 카드가 240px 고정이라 트랙(240*3 + 16*2 = 752px)이 창에 통째로 들어가는 폭에서는
   슬라이드가 의미 없이 좌우로 흔들리기만 한다. 창 = 뷰포트 - .pd-secs 32px 이므로
   784px 부터 다 들어간다 — 그 구간은 2번 카드를 가운데 둔 채 세워 둔다. */
@media (min-width: 784px) and (max-width: 1023px) {
  .section03 .works-figure-content,
  .works-content.show .section03 .works-figure-content {
    animation: none;
    left: calc(var(--slider-home) - var(--slider-step));
  }
}

/* ========================= SECTION 04 ========================= */
.section04 {
  position: relative;
  overflow: hidden;
  padding-top: 132px;
  padding-bottom: 144px;
  background:
    linear-gradient(
      180deg,
      rgba(246, 248, 255, 0.4) 0%,
      rgba(255, 255, 255, 0.4) 0.01%,
      rgba(211, 243, 255, 0.4) 45%,
      rgba(198, 200, 255, 0.4) 80.5%
    ),
    #fff;
}
.section04 .works-desc {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section04 .works-desc-title {
  margin-bottom: 0;
}
@media (min-width: 768px) {
  .section04 .works-figure {
    position: absolute;
    max-width: 400px;
    bottom: 0;
    right: calc(50vw - 768px + 85px);
  }
  .section04 .works-figure img {
    border-radius: 16px 16px 0 0;
  }
}
@media (max-width: 767px) {
  .section04 {
    padding-bottom: 0;
  }
  .section04 .works-figure {
    margin-top: 40px;
  }
  .section04 .works-figure img {
    max-width: 73.333vw;
    border-radius: 16px 16px 0 0;
  }
}

/* ========================= SECTION 05 ========================= */
.section05 {
  background-color: #0b1760;
  background-image: url("./img/bg_section_channel.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}
.section05 .works-desc {
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: flex-start;
}
.section05 .works-desc-title {
  min-width: 424px;
  color: #fff;
  text-align: left;
}
.section05 .works-desc-text {
  color: #ddd;
  text-align: left;
}
.section05 .works-figure {
  margin-top: 138px;
  width: 100%;
  display: flex;
  justify-content: center;
}
.section05 .works-figure img {
  max-width: 1589px;
  width: 100%;
}

@media (max-width: 767px) {
  .section05 {
    background-image: url("./img/bg_section_channel_mo.png");
    background-size: cover;
  }
  .section05 .works-figure {
    margin: 40px -24px 0;
  }
}

/* ========================= SECTION 06 ========================= */
.section06 {
  background-color: #fff;
}
.section06 .works-figure {
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}
.section06 .works-figure-content {
  gap: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section06 .works-desc {
  margin: 128px auto;
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: flex-start;
}
.section06 .works-desc-title {
  text-align: left;
  margin: 0;
  min-width: 424px;
}
.section06 .works-desc-text {
  text-align: left;
}

@media (max-width: 767px) {
  .section06 .works-figure-content {
    margin-top: 40px;
    flex-direction: column;
    gap: 0;
  }
  .section06 .works-figure-content li:nth-child(2) {
    margin: 48px 0 24px;
  }
  .section06 .works-desc {
    margin: 40px auto;
    flex-direction: column;
    gap: 24px;
  }
}

/* ========================= SECTION 07 ========================= */
.section07 {
  background-color: rgba(11, 23, 96, 1);
  color: #fff;
}
.section07 .works-desc {
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: flex-start;
}
.section07 .works-desc-title {
  color: #fff;
  text-align: left;
  margin: 0;
  min-width: 424px;
}
.section07 .works-desc-text {
  color: #fff;
  text-align: left;
}
.section07 .works-figure img {
  margin-top: 128px;
  max-width: 1142px;
  width: 100%;
}

@media (max-width: 767px) {
  .section07 .works-figure img {
    margin-top: 40px;
  }
}

/* ========================= SECTION 08 ========================= */
.section08 {
  position: relative;
  background-color: #f5f5f5;
  z-index: 1;
}
.section08::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 304px;
  display: block;
  border-radius: 50%;
  width: 71.25vw;
  height: 71.25vw;
  max-width: 1140px;
  max-height: 1140px;
  margin: auto;
  background-color: #2a3fec;
  z-index: -1;
  transform: scale(0);
  transition: transform 0.75s;
}
.works-content.show .section08::after {
  transform: scale(1);
}

@media (max-width: 767px) {
  .section08 {
    overflow: hidden;
  }
  .section08::after {
    top: 380px;
    transform-origin: center 70px;
  }
  .works-content.show .section08::after {
    transform: scale(1.5);
  }
}

.section08 .works-desc {
  margin: 16px 0 65px;
}
.section08 .works-desc-title,
.section08 .works-desc-text {
  text-align: center;
  color: #fff;
  margin: 0;
}
.section08 .works-desc-text {
  margin-top: 20px;
}

@media (max-width: 767px) {
  .section08 .works-desc {
    margin-bottom: 32px;
  }
  .section08 .works-desc-title,
  .section08 .works-desc-text {
    color: #111;
    text-align: left;
  }
  .section08 .works-desc-text {
    margin-top: 32px;
  }
}

.section08 .works-figure {
  flex-direction: column;
  align-items: center;
  display: flex;
  width: 100%;
}
.section08 .works-figure .ux-icon {
  position: relative;
  z-index: 10;
  max-width: 318px;
  animation: uxIcons 1s ease-in-out 0.75s infinite alternate;
}
.section08 .works-figure .ux-device {
  max-width: 535px;
  position: relative;
  z-index: 2;
}

@keyframes uxIcons {
  from {
    transform: translateY(20px);
  }
  to {
    transform: translateY(-5px);
  }
}

@media (max-width: 767px) {
  .section08 .works-figure .ux-icon {
    max-width: 150px;
  }
  .section08 .works-figure .ux-device {
    margin-top: -20px;
    max-width: 220px;
  }
}

/* Section08 부유하는 디바이스 텍스트 요소들 */
.section08 .device-text {
  position: absolute;
  top: 304px;
  width: 1140px;
  height: 1140px;
  z-index: 3;
}
.section08 .device-text li {
  position: absolute;
}
.section08 .device-text img {
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .section08 .device-text .left .device-text-uno {
    top: 518px;
    left: -54px;
    width: 282px;
    height: 54px;
  }
  .section08 .device-text .left .device-text-dos {
    top: 381px;
    left: 159px;
    width: 198px;
    height: 44px;
  }
  .section08 .device-text .left .device-text-tres {
    top: 743px;
    left: 176px;
    width: 141px;
    height: 36px;
  }

  .section08 .device-text .right .device-text-uno {
    right: -54px;
    top: 497px;
    width: 243px;
    height: 54px;
  }
  .section08 .device-text .right .device-text-dos {
    right: 24px;
    top: 280px;
    width: 193px;
    height: 54px;
  }
  .section08 .device-text .right .device-text-tres {
    right: 151px;
    top: 411px;
    width: 151px;
    height: 36px;
  }
  .section08 .device-text .right .device-text-quatro {
    right: 123px;
    top: 640px;
    width: 206px;
    height: 54px;
  }
}

@media (max-width: 767px) {
  .section08 .device-text {
    top: 280px;
    width: 300px;
    height: 600px;
  }
  .section08 .device-text .left .device-text-uno {
    top: 305px;
    left: 0;
    width: 100px;
    height: 27px;
  }
  .section08 .device-text .left .device-text-dos {
    top: 74px;
    left: 0;
    width: 96px;
    height: 22px;
  }
  .section08 .device-text .left .device-text-tres {
    top: 500px;
    left: 35px;
    width: 68px;
    height: 18px;
  }

  .section08 .device-text .right .device-text-uno {
    right: 17px;
    top: 312px;
    width: 93px;
    height: 27px;
  }
  .section08 .device-text .right .device-text-dos {
    right: 17px;
    top: 262px;
    width: 99px;
    height: 24px;
  }
  .section08 .device-text .right .device-text-tres {
    right: 31px;
    top: 421px;
    width: 74px;
    height: 18px;
  }
  .section08 .device-text .right .device-text-quatro {
    right: 123px;
    top: 640px;
    width: 206px;
    height: 54px;
  }
}

/* =========================================================
 전역 Max-Width 1023px 여백 재정렬 (반응형 최적화)
 ========================================================= */
@media (max-width: 1023px) {
  .works-section {
    padding: 48px 32px;
  }
  .works-section.section04 {
    padding: 48px 32px 0;
  }
  .work-container .works-desc-title {
    font-size: 24px;
    line-height: 30px;
  }
  .work-container .works-desc-text {
    font-size: 14px;
    line-height: 18px;
  }

  .section03 .works-desc,
  .section04 .works-desc,
  .section05 .works-desc,
  .section06 .works-desc,
  .section07 .works-desc,
  .section08 .works-desc {
    flex-direction: column !important;
    gap: 32px !important;
    margin: 0 auto;
    width: 100%;
  }
  .section01 .works-desc-title {
    margin-bottom: 32px;
  }
  .section05 .works-desc-title {
    margin-bottom: 0;
  }
  .section03 .works-desc-title,
  .section05 .works-desc-title,
  .section06 .works-desc-title,
  .section07 .works-desc-title {
    width: 100%;
    min-width: unset;
  }
  .section03 .works-desc-text,
  .section05 .works-desc-text,
  .section06 .works-desc-text,
  .section07 .works-desc-text {
    margin: 0;
  }
  .section08 {
    margin-block: 0;
  }
}
