/* S3. Install Malicious */

/* ============================================================
   DESKTOP
   ============================================================ */

/* 섹션 배경 */
.landing-section--install-malicious {
    background: #22272A;
}

/* 섹션 내부 wrapper (세로 flex) */
.landing-section--install-malicious .landing-section__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* 캐러셀 뷰포트 (잘라내는 창) */
.landing-install-malicious__carousel {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 캐러셀 트랙 (슬라이드들을 옆으로 미는 실제 컨테이너) */
/* overflow:hidden(위)과 슬라이드를 미는 transform(아래)을 같은 엘리먼트에
   걸면, 슬라이드가 옆으로 밀릴 때 "잘라내는 창" 자체도 같이 밀려나서
   2번째 슬라이드부터는 아무것도 안 보이게 된다. 그래서 트랙을 따로 뺐다. */
.landing-install-malicious__track {
    --carousel-slide: 0;
    width: 100%; /* flex:1로 두면 슬라이드 min-width:100%와 서로 너비를 물어
                    순환 참조가 되어 track이 1920보다 넓게 계산 → 콘텐츠가
                    오른쪽으로 쏠린다. 부모 너비에 딱 고정한다. */
    display: flex;
    transform: translateX(calc(var(--carousel-slide) * -100%));
    transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

/* 트랙 — 트랜지션 없이 즉시 이동시킬 때 */
.landing-install-malicious__track.is-instant {
    transition: none;
}

/* 슬라이드 1장 (이미지 + 텍스트) */
.landing-install-malicious__slide {
    min-width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 0 var(--landing-gutter);
    box-sizing: border-box;
}

/* 이미지 wrapper */
.landing-install-malicious__visual {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    transform: translateX(-40px);
}

/* 폰 스크린샷 이미지 (01/02/03.png) */
.landing-install-malicious__img {
    height: 600px;
    width: 316px;
}

/* 폰 스크린샷 위에 겹치는 gif (3번째 슬라이드 전용) */
.landing-install-malicious__gif {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 65%;
    object-fit: contain;
}

/* 텍스트 블록 wrapper (타이틀 이미지 + 스텝 + 설명) */
.landing-install-malicious__text {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: flex-start;
    margin-top: 450px;
}

/* 빨간 타이틀 이미지 (comment.png, "악성앱은 조용히 설치됩니다.") */
.landing-install-malicious__comment {
    width: 360px;
    object-fit: contain;
    margin-top: -170px;
}

/* 타이틀 텍스트 (미사용 — comment.png 이미지로 대체됨) */
/*.landing-install-malicious__title {*/
/*    font-size: 40px;*/
/*    font-weight: 800;*/
/*    line-height: 1.5;*/
/*    color: #FF4B6E;*/
/*    margin: 0;*/
/*}*/

/* 스텝 뱃지 (번호 원 + 라벨) */
.landing-install-malicious__step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
    transform: translateY(80px);
}

/* 스텝 번호 원 */
.landing-install-malicious__step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* 흰색 설명 텍스트 */
.landing-install-malicious__description {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    transform: translateY(80px);
}

/* dot 페이지네이션 wrapper */
.landing-install-malicious__pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 164px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* 개별 dot */
.landing-install-malicious__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

/* 활성 dot */
.landing-install-malicious__dot.is-active {
    background-color: #fff;
}

/* ============================================================
   MOBILE — max-width 1139px (see landing_breakpoints.css)
   ============================================================ */

@media (max-width: 1139px) {
    /* 캐러셀 트랙 — 데스크탑은 JS가 --carousel-slide로 transform을 미는
       방식이지만, 모바일은 스와이프가 곧바로 스크롤이 되도록 네이티브
       scroll-snap-x에 맡긴다(core-common.js의 createCarouselModule이
       이 폭 기준으로 분기). */
    /* 섹션 자체는 폭 전체를 채워서 배경이 화면 끝까지 이어지게 하고,
       콘텐츠(.inner)만 360px로 가운데 고정한다. */
    .landing-section--install-malicious .landing-section__inner {
        width: 360px;
        margin: 0 auto;
    }

    .landing-install-malicious__carousel {
        flex: none;
        height: 800px;
        overflow: hidden;
    }

    .landing-install-malicious__track {
        overflow-x: scroll;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        transform: none;
    }

    /* 트랙 — 스크롤바 숨김 */
    .landing-install-malicious__track::-webkit-scrollbar {
        /*display: none;*/
    }

    /* 슬라이드 1장 — 슬라이드 1은 스텝 뱃지(.step)가 없어서 .text 높이가
       슬라이드마다 달랐고, 그래서 .comment 위치도 슬라이드마다 밀렸다.
       .text를 flex 흐름에서 빼서 position:absolute로 고정 위치에 앉히면
       콘텐츠 높이와 무관하게 항상 같은 자리에서 시작한다. 이미지(.visual)는
       남은 유일한 flex 항목이라 padding-top으로 시작 위치를 잡아준다.
       padding-top(340px)은 헤더 높이(96px) + 텍스트 블록 최대 높이(약
       213px, 스텝 뱃지 있는 슬라이드 기준) + 여유 30px로 잡은 값. */
    .landing-install-malicious__slide {
        position: relative;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 428px 0 0;
        min-height: 0;
    }

    /* 이미지 wrapper */
    .landing-install-malicious__visual {
        margin-bottom: 0;
        transform: none;
    }

    /* 폰 스크린샷 이미지 (01/02/03.png) */
    .landing-install-malicious__img {
        width: 280px;
        height: 532px;
    }

    /* 텍스트 블록 wrapper — 모바일 헤더 높이(96px) 아래에서 고정 거리에
       앉혀서, .step 유무로 높이가 달라져도 시작 위치는 항상 동일하게
       유지한다. */
    .landing-install-malicious__text {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    /* 빨간 타이틀 이미지 (comment.png, "악성앱은 조용히 설치됩니다.") */
    .landing-install-malicious__comment {
        width: 238px;
        height: 96px;
        transform: translateY(-300px);
    }

    /* 스텝 뱃지 (번호 원 + 라벨) */
    .landing-install-malicious__step {
        color: #8F9599;
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
        transform: translateY(-300px);
    }

    /* 흰색 설명 텍스트 (예: "사칭 문자 속 링크 클릭") */
    .landing-install-malicious__description {
        color: #F5F6F7;
        text-align: center;
        font-size: 20px;
        font-weight: 700;
        line-height: 1.5;
        transform: translateY(-290px);
    }

    /* dot 페이지네이션 wrapper — 텍스트 블록(top:96px 시작, 최대
       ~309px까지)과 이미지(.slide padding-top:340px 시작) 사이에 오도록
       하는 값. 실기기/브라우저에서 보면서 조정 필요 */
    .landing-install-malicious__pagination {
        bottom: auto;
        top: 316px;
    }
}
