/* ============================================================
   Products (vending) — 진로자판기 / 마음자판기 페이지 전용 override
   ▸ <main class="products-vending"> 스코프. 공통 규칙은 products.css 참고.
   ▸ 인트로 제품 이미지 폭 / 활용처 그리드 컬럼 수만 자판기용으로 덮어씀.
   ============================================================ */

.mo {
    display: none;
}
   /* width 만 덮어씀 — transform 은 두지 않는다.
   visual 에 data-aos="fade-right" 가 있어 AOS 가 transform 을 제어하므로,
   여기서 transform(none 포함)을 선언하면 AOS 의 시작 offset 을 덮어써 애니메이션이 죽는다. */
.products-vending .product-intro__visual {
    width: 965px;
}

.products-vending .product-platform__cases {
    grid-template-columns: repeat(3, 448px);
}

/* intro — title-main / title-accent / desc / visual 가 한 줄씩 순차 fade-up (data-aos + stagger delay).
   AOS 기본 fade-up 이동(100px)을 30px 로 줄여 weromy 모바일 인트로처럼 은은하게. opacity/타이밍은 AOS. */
.products-vending .product-intro [data-aos] {
    transform: translate3d(0, 30px, 0);
}

.products-vending .product-intro [data-aos].aos-animate {
    transform: translate3d(0, 0, 0);
}

/* ============================================================
   Vending Detail — 좌측 sticky 네비 + 제품별 풀폭 밴드
   ▸ .vending-detail__nav 를 float + sticky 로 두 밴드에 걸쳐 고정.
   ▸ .vending-product--career / --mind 는 각각 풀폭 밴드로 서로 다른 배경색을 가짐
     (배경이 섹션 전체 폭으로 깔리고, 가운데 .vending-product__inner 가 콘텐츠를 담음).
   ▸ 밴드별 배너 → 핵심기능(2×2) → UI 플로우(3·3·2) → 결과물 명함(4).
   ============================================================ */
.vending-detail {
    position: relative;
}

/* ── 좌측 고정 네비게이션 — 두 밴드에 걸쳐 sticky 부유 ───
   float 로 흐름에서 빼서 우측 밴드가 풀폭(배경 풀블리드)을 유지하게 하고,
   sticky 로 스크롤 동안 고정. margin-left 로 가운데 정렬된 .inner 좌측 경계에 맞춤. */
.vending-detail__nav {
    float: left;
    position: sticky;
    top: 120px;                     /* 스크롤 고정 시 뷰포트 상단에서의 오프셋(고정 헤더 100px 아래) */
    z-index: 3;
    margin-top: 120px;              /* 자연 위치 — 섹션 상단에서 120px 내려서 시작 */
    margin-left: max(20px, calc((100% - 1440px) / 2));   /* .inner 좌측 경계에 정렬 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;        /* 버튼은 콘텐츠(패딩) 폭만큼만 */
    gap: 12px;
}

.vending-detail__nav-item {
    position: relative;
    z-index: 0;                     /* ::after 그라데이션 오버레이의 stacking 기준 */
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 50px;
    background: #9F9F9F;            /* 기본(비활성) 회색 */
    color: #fff;
    font-size: 1.125rem;
    font-weight: 500;
}

/* active 배경 그라데이션 — ::after 를 깔고 opacity 로 페이드
   (linear-gradient 는 직접 transition 이 안 되므로 오버레이 불투명도로 부드럽게 전환) */
.vending-detail__nav-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;                    /* 회색 배경 위 · 글자/동심원 아래 */
    border-radius: inherit;
    background: linear-gradient(90deg, #68C9FF 0%, #3191E0 100%);   /* 진로자판기(블루) */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.vending-detail__nav-item[href="#vending-mind"]::after {
    background: linear-gradient(90deg, #FF8F93 0%, #E8383D 100%);   /* 마음자판기(레드) */
}

.vending-detail__nav-item.is-active::after {
    opacity: 1;
}

/* active 표시 동심원 — 비활성 시 width/height 0(자리 안 잡음), active 시 0→20 으로
   가로·세로가 함께 커져 원형을 유지하며 생겨나고 글자를 밀어냄. (해제 시 반대로 줄며 사라짐) */
.vending-detail__nav-item::before {
    content: "";
    flex: 0 0 auto;
    width: 0;
    height: 0;
    margin-right: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #DDF1FF 0 28%, #93D4FF 32% 100%);   /* 블루 동심원 */
    opacity: 0;
    transition: width 0.3s ease, height 0.3s ease, margin-right 0.3s ease, opacity 0.3s ease;
}

/* 마음자판기 동심원 — 핑크 톤 */
.vending-detail__nav-item[href="#vending-mind"]::before {
    background: radial-gradient(circle, #FF989B 0 28%, #FF484E 32% 100%);
}

.vending-detail__nav-item.is-active::before {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    opacity: 1;
}

/* ── 제품 밴드 — 풀폭, 제품별 배경색 ─────────────────────
   career(블루 톤) / mind(핑크 톤). 배경은 섹션 전체 폭으로 깔리고,
   콘텐츠는 가운데 .vending-product__inner 에 담긴다. */
.vending-product {
    padding: 100px 0;
}

.vending-product--career {
    --vending-accent: #3B82F6;
    --vending-accent-soft: #EAF2FF;
    background: linear-gradient(180deg, #FFF 0%, #EFFAFD 100%);
}

.vending-product--mind {
    --vending-accent: #FF6FA5;
    --vending-accent-soft: #FFEDF4;
    background: linear-gradient(180deg, #FFF 0%, #FFF3F3 100%);
}

/* .inner(1440 max, margin 0 auto) 는 일반 블록으로 둔다 — flex(=BFC)로 두면 float 네비를
   회피하느라 inner 자체가 밀리므로, 블록으로 둬서 float 위에 겹친 채 가운데 정렬을 유지.
   그 안의 상세 콘텐츠 블록을 max-width 1050 + margin-left:auto 로 inner 오른쪽 끝에 붙인다.
   (좌측 빈 영역 1440-1050=390px 이 네비 자리) */
.vending-product__inner > * {
    max-width: 1050px;
    margin-left: auto;          /* inner 오른쪽 끝 정렬 */
}

.vending-product__inner > * + * {
    margin-top: 120px;          /* 블록 간 세로 간격 (flex gap 대체) */
}

/* 각 콘텐츠 블록 — 헤더와 본문 사이 / 본문 행 사이 간격 통일 */
.vending-features,
.vending-flow,
.vending-result {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ── ① 배너 ─────────────────────────────────────────── */
.vending-product__banner {
    border-radius: 16px;
    overflow: hidden;
}

.vending-product__banner img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── ② 핵심 기능 (2×2 그리드) ───────────────────────── */
.vending-features__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vending-features__card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    border-radius: 16px;
    border: 2px solid #3191E0;
    background: #fff;
    box-shadow: 4px 4px 20px 0 rgba(90, 189, 217, 0.30);
}

.vending-product--mind .vending-features__card {
    border: 2px solid #E8383D;
    box-shadow: 4px 4px 20px 0 rgba(232, 56, 61, 0.30);
}

.vending-features__card-icon {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
}

.vending-features__card-icon img,
.vending-features__card-icon svg {
    width: 100%;
    height: 100%;
}


.vending-features__card-title {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -1px;
}

/* ── ③ UI 플로우 (3·3·2 행, 사이 화살표) ──────────────── */
.vending-flow__row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
}

.vending-flow__step {
    padding: 20px 0;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.vending-flow__step-img {
    border-radius: 12px;
    box-shadow: 3px 3px 15px 0 rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.vending-flow__step-img img {
    display: block;
    width: 100%;
    height: auto;
}

.vending-flow__step-caption {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    gap: 8px;
}

.vending-flow__step-caption .step_num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4A90E2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 400;
    font-size: 1rem;
}

.vending-product--mind .vending-flow__step-caption .step_num {
    background: #E8383D;
}

/* step 사이 꺾쇠 — phone 중앙 부근에 세로 정렬 */
.vending-flow__arrow {
    flex: 0 0 auto;
    align-self: center;
    color: #4A90E2;
    font-size: 2rem;
    line-height: 1;
}

.vending-product--mind .vending-flow__arrow {
    color: #E8383D;
}

/* 3행(마지막) — 2장: 첫 번째 360px, 두 번째 490px (높이는 이미지 비율대로 auto) */
.vending-flow__row--pair {
    gap: 0;
    justify-content: space-between;     /* 양쪽 끝 정렬 */
    align-items: center;
}

.vending-flow__row--pair .vending-flow__step {
    flex: 0 0 auto;
}

.vending-flow__row--pair .vending-flow__step:first-child {
    width: 360px;
}

.vending-flow__row--pair .vending-flow__step:last-child {
    width: 490px;
}

.vending-flow__row--pair .vending-flow__step-img {
    width: 100%;
    background: var(--vending-accent-soft);
}

/* 마음자판기 2행(pair) — 두 이미지 사이 화살표 있음 + 폭 238 / 360, 가운데 정렬 */
.vending-product--mind .vending-flow__row--pair {
    gap: 40px;
    justify-content: center;
}

.vending-product--mind .vending-flow__row--pair .vending-flow__step:first-child {
    width: 238px;
}

.vending-product--mind .vending-flow__row--pair .vending-flow__step:last-child {
    width: 360px;
}

/* ── ④ 결과물 예시 (명함 4장) ──────────────────────── */
.vending-result__list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 45px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vending-result__card {
    box-shadow: 3px 3px 15px 0 rgba(0, 0, 0, 0.15);
}

.vending-result__card img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── 1440px 이하 ──────────────────────────────────────── */
@media (max-width: 1440px) {
    /* 자판기 intro visual — 데스크톱 965px override 가 공통 미디어(width:100%)보다
       specificity 가 높아 안 먹으므로, 자판기 스코프로 다시 컬럼 폭에 맞춰 축소 */
    .products-vending .product-intro__visual {
        width: 100%;
    }

    /* 활용처 — repeat(3, 448px) 고정 override 가 공통 미디어를 이기므로 유동 컬럼으로 재설정 */
    .products-vending .product-platform__cases {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vending-product {
        padding: 80px 0;
    }

    .vending-product__inner > * + * {
        margin-top: 80px;
    }

    .vending-features .section-heading__title,
    .vending-flow .section-heading__title,
    .vending-result .section-heading__title {
        font-size: 1.875rem;        /* 36 → 30 */
        letter-spacing: -1px;
    }

    .vending-features__card {
        padding: 24px;
        gap: 16px;
    }

    .vending-flow__row {
        gap: 16px;
    }

}

/* ── 768px 이하 (모바일) — 1열 적층, 네비 가로 탭 ───────── */
@media (max-width: 768px) {
    .mo {
        display: block !important;
    }
    /* 활용처 — 3개라 모바일에선 1열로 적층 (공통 미디어의 repeat(2,1fr) override) */
    .products-vending .product-platform__cases {
        grid-template-columns: 1fr;
    }

    /* 네비 — float 해제, 헤더(64px) 아래 sticky 가로 탭바로 고정 (스크롤해도 기능 유지) */
    .vending-detail__nav {
        position: sticky;
        top: 64px;                  /* 모바일 고정 헤더(64px) 아래 */
        z-index: 5;
        float: none;
        width: 100%;
        margin: 0;
        flex-direction: row;
        gap: 8px;
        padding: 12px 20px;
        background: #fff;           /* 스크롤 시 뒤 콘텐츠 가림 */
        box-sizing: border-box;
    }

    .vending-detail__nav-item {
        flex: 1 1 0;
        justify-content: center;
        padding: 12px 16px;
        font-size: 1rem;
    }

    /* 밴드 — 1열 적층 (콘텐츠는 max-width 1050 < 모바일 폭이라 자동 풀폭) */
    .vending-product {
        padding: 56px 0;
    }

    .vending-product__inner > * + * {
        margin-top: 56px;
    }

    .vending-features,
    .vending-flow,
    .vending-result {
        gap: 28px;
    }

    .vending-product__banner {
        border-radius: 12px;
    }

    /* 핵심 기능 — 1열 */
    .vending-features__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .vending-features__card {
        padding: 20px;
        gap: 14px;
        border-radius: 12px;
    }

    .vending-features__card-icon {
        width: 48px;
        height: 48px;
    }

    .vending-features__card-title {
        font-size: 1.125rem;
    }

    /* UI 플로우 — 모바일 2열. row 래퍼를 display:contents 로 풀어 전체 step 을
       .vending-flow 그리드에 2개씩 흘림 (진로 2·2·2·2 / 마음 2·2·1). */
    .vending-flow {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 12px;
    }

    .vending-flow__step-caption .step_num {
        width: 20px;
        height: 20px;
        
    }

    .vending-flow > .section-heading {
        grid-column: 1 / -1;        /* 헤더는 전체 폭 */
    }

    .vending-flow__row,
    .vending-flow__row--pair {
        display: contents;          /* 래퍼 해제 → step 들이 그리드 셀로 직접 배치 */
    }

    .vending-flow__arrow {
        display: none;              /* 모바일에선 화살표 숨김 */
    }

    /* 데스크톱 폭(flex:1) 해제 → 그리드 셀 채움 */
    .vending-flow__step {
        width: auto;
        min-width: 0;
        padding: 0;
    }

    /* pair 고정폭은 :first/:last-child(+ --mind)로 잡혀 specificity 가 높으므로 동일 선택자로 해제 */
    .vending-flow__row--pair .vending-flow__step:first-child,
    .vending-flow__row--pair .vending-flow__step:last-child,
    .vending-product--mind .vending-flow__row--pair .vending-flow__step:first-child,
    .vending-product--mind .vending-flow__row--pair .vending-flow__step:last-child {
        width: auto;
        align-self: flex-end;
    }

    /* 이미지가 셀을 넘치지 않도록 — step 이 align-items:center 라 step-img 를 셀 폭에 강제 맞춤 */
    .vending-flow__step-img {
        width: 100%;
    }

    /* 결과물 — 2열 */
    .vending-result__list {
        gap: 12px;
    }
}
