/* ==========================================================================
   DAMDA 2026 — 포트폴리오 목록
   시안: portfolio_base / portfolio_mouse over event / portfolio_tag title click event
   ========================================================================== */

#pflist2026 {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px 16px;
}

/* ---------- 서브바 ---------- */
#pflist2026 .pf-subbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0 20px; /* 검색창 우측 = CONTACT 우측선 정렬 */
}

#pflist2026 .pf-cats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    padding-left: 24px; /* 페이지 패딩 16 + 24 = 좌측 40px (XD) */
}

#pflist2026 .pf-cat {
    /* XD 스펙: normal normal 500 32px/48px Pretendard */
    font-family: var(--font-kr);
    font-size: 32px;
    font-weight: 500;
    line-height: 48px;
    letter-spacing: -0.64px;
    color: #A8B2AD;
    transition: color .2s ease;
}

#pflist2026 .pf-cat:hover { color: var(--dark-gray); }

#pflist2026 .pf-cat.is-active { color: var(--ink); }

/* 검색 */
#pflist2026 .pf-search {
    display: flex;
    align-items: center;
    /* XD 스펙: 460×64, #F9F9F9, 1px #D9E0DD, radius 4px (FAQ~CONTACT 라인 정렬) */
    background: #F9F9F9 0% 0% no-repeat padding-box;
    border: 1px solid #D9E0DD;
    border-radius: 4px;
    width: 460px; /* 고정 폭 — 우측 정렬로 FAQ 좌측선~CONTACT 우측선에 맞음 */
    height: 64px;
    padding: 0 20px 0 24px;
    flex: 0 0 auto;
}

#pflist2026 .pf-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    /* XD 스펙: normal normal 450 24px/48px Pretendard */
    font-family: var(--font-kr);
    font-size: 24px;
    font-weight: 400;
    line-height: 48px;
    letter-spacing: -0.48px;
    color: var(--ink);
    outline: none;
}

#pflist2026 .pf-search-input::placeholder { color: #A8B2AD; }

#pflist2026 .pf-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

/* ---------- 형태 선택창 (단상자/골판지) ---------- */
#pflist2026 .pf-shapes[hidden] { display: none; }

#pflist2026 .pf-shape[hidden] { display: none; }

#pflist2026 .pf-shapes {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 16px;
    margin-bottom: 16px;
    overflow-x: auto;
}

#pflist2026 .pf-shape {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 118px;
    height: 118px;
    flex: 0 0 auto;
    background: var(--white-gray);
    cursor: pointer;
    transition: box-shadow .15s ease, background-color .15s ease;
}

#pflist2026 .pf-shape input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#pflist2026 .pf-shape-tag {
    position: absolute;
    top: 10px;
    left: 12px;
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    letter-spacing: 0;
    white-space: nowrap;
}

#pflist2026 .pf-shape img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    opacity: .8;
}

#pflist2026 .pf-shape:hover { background: var(--pastel-green); }

#pflist2026 .pf-shape.is-checked {
    background: var(--pastel-green);
    box-shadow: inset 0 0 0 2px var(--green);
}

/* ---------- 카드 그리드 ---------- */
#pflist2026 .pf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#pflist2026 .pf-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #fff;
}

#pflist2026 .pf-card.is-hidden { display: none; }

#pflist2026 .pf-card-media,
#pflist2026 .pf-card-media img,
#pflist2026 .pf-card-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#pflist2026 .pf-card-media video {
    opacity: 0;
    transition: opacity .25s ease;
}

#pflist2026 .pf-card.is-playing .pf-card-media video { opacity: 1; }

/* 호버 오버레이 */
#pflist2026 .pf-card-overlay {
    position: absolute;
    inset: 0;
    padding: 36px 44px;
    background: linear-gradient(135deg, rgba(20, 32, 25, .78) 0%, rgba(20, 32, 25, .45) 55%, rgba(20, 32, 25, .25) 100%);
    opacity: 0;
    transition: opacity .25s ease;
}

#pflist2026 .pf-card:hover .pf-card-overlay,
#pflist2026 .pf-card:focus-visible .pf-card-overlay { opacity: 1; }

#pflist2026 .pf-card-cap {
    font-family: var(--font-en);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8FCDA6;
    margin-bottom: 14px;
}

#pflist2026 .pf-card-title {
    font-family: var(--font-en);
    font-size: 34px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--pastel-green);
    max-width: 60%;
    margin-bottom: 12px;
}

#pflist2026 .pf-card-sub {
    font-size: 15px;
    color: var(--white-gray);
}

#pflist2026 .pf-noresult {
    padding: 64px 0;
    text-align: center;
    color: var(--dark-gray);
}

/* 맨 위로 */
#pflist2026 .pf-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    z-index: 50;
}

/* ---------- 모바일 ---------- */
@media (max-width: 900px) {
    #pflist2026 { padding: 0 16px 8px; } /* 좌우 거터 16px (XD) */

    #pflist2026 .pf-subbar {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 16px;
        padding: 0 0 16px;
    }

    /* 거터가 16px이 되면서 컨테이너 폭 그대로 = 화면 16px 기준선 정렬 */
    #pflist2026 .pf-search {
        width: 100%;
        margin: 0 auto;
        max-width: none;
        height: 40px;
        border-radius: 0;
        /* 플레이스홀더 시작점 = 로고 텍스트 시작점(거터 16 + 로고 패딩 16 = 32px) */
        padding: 0 12px 0 16px;
    }

    #pflist2026 .pf-search-input {
        font-size: 16px;
        line-height: 38px;
        letter-spacing: -0.32px;
    }

    #pflist2026 .pf-search-btn { padding: 4px; }

    #pflist2026 .pf-search-btn svg { width: 18px; height: 18px; }

    #pflist2026 .pf-cats {
        gap: 20px;
        /* 클립 경계 = 화면 19px (검색 박스 16px 기준선 + 3) — 거터 16 기준 보정 */
        margin: 0 3px;
        padding: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        /* 가로 스크롤바 숨김 — 탭 아래 간격이 16px로 딱 떨어지게 */
        scrollbar-width: none;
    }

    #pflist2026 .pf-cats::-webkit-scrollbar { display: none; }

    /* 데스크톱 line-height(48px)의 상하 여백 제거 — 위아래 간격 균일화 */
    #pflist2026 .pf-cat { font-size: 18px; line-height: 1.3; }

    #pflist2026 .pf-shapes { gap: 8px; padding: 12px; }

    #pflist2026 .pf-shape { width: 96px; height: 96px; }

    #pflist2026 .pf-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #pflist2026 .pf-card-overlay { padding: 24px; }

    #pflist2026 .pf-card-title { font-size: 24px; max-width: 80%; }

    #pflist2026 .pf-top { right: 12px; bottom: 12px; width: 52px; height: 52px; }
}

/* 와이드(>1920): 본문 여백을 헤더·푸터 인셋(8px)과 정렬 */
@media (min-width: 1921px) {
    #pflist2026 { padding: 0 8px 8px; }
}

/* ==========================================================================
   와이드(>1920) — Figma 4K-PORTFOLIO 실측값(절반 스케일) 재정의
   규칙: base/base.css 와이드 블록 주석 참고 (4K값 ÷ 2 를 CSS값으로 지정)
   ========================================================================== */
@media (min-width: 1921px) {
    /* 서브바 — 4K: 탭 40px, 검색창 940×88 (헤더 바로 아래 정렬) */
    #pflist2026 .pf-subbar { padding: 0 0 10px; }

    #pflist2026 .pf-cats { gap: 18px; padding-left: 12px; } /* 4K: 탭 좌측 총 40 */

    #pflist2026 .pf-cat { font-size: 20px; line-height: 24px; } /* 4K 40/48 */

    #pflist2026 .pf-search {
        width: 470px;              /* 4K 940 */
        height: 44px;              /* 4K 88 */
        border-radius: 2px;
        padding: 0 10px 0 12px;
    }

    #pflist2026 .pf-search-input { font-size: 16px; line-height: 24px; }

    #pflist2026 .pf-search-btn { padding: 4px; }

    /* 형태 선택창 — 4K: 셀 144, 아이콘 80 */
    #pflist2026 .pf-shapes { gap: 10px; padding: 8px; margin-bottom: 8px; }

    #pflist2026 .pf-shape { width: 72px; height: 72px; }

    #pflist2026 .pf-shape img { width: 40px; height: 40px; }

    #pflist2026 .pf-shape-tag { top: 5px; left: 6px; font-size: 10px; }

    /* 카드 그리드 — 4K: 2열 유지, 거터 16 고정 */
    #pflist2026 .pf-grid { gap: 8px; }

    /* 호버 오버레이 — 물리 크기 유지(절반 스케일) */
    #pflist2026 .pf-card-overlay { padding: 18px 22px; }

    #pflist2026 .pf-card-cap { font-size: 9px; margin-bottom: 7px; }

    #pflist2026 .pf-card-title { font-size: 17px; margin-bottom: 6px; }

    #pflist2026 .pf-card-sub { font-size: 9px; }

    #pflist2026 .pf-noresult { padding: 32px 0; }

    /* 맨 위로 버튼 — 물리 크기 유지 */
    #pflist2026 .pf-top { width: 32px; height: 32px; right: 12px; bottom: 12px; }
}

/* 오프스크린 카드는 레이아웃·페인트 생략 (대형 그리드 성능) */
#pflist2026 .pf-card { content-visibility: auto; }
