/* ============================================================
   Portfolio Cards – Front-end Styles
   Prefix: pfc-  (Portfolio Cards)
   모든 셀렉터에 pfc- 접두어 사용 → 타 CSS와 충돌 없음
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700;900&display=swap');

/* ---- Reset scope ---- */
.pfc-wrapper,
.pfc-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.pfc-wrapper {
    width: 100%;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
    --pfc-main-color: #113776;
}

/* ============================================================
   Controls – 열 전환 버튼 (좌측 상단)
   ============================================================ */

.pfc-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 18px;
}

.pfc-col-buttons {
    display: flex;
    gap: 7px;
    padding: 5px;
    border: 1px solid rgba(17, 55, 118, 0.28);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(17, 55, 118, 0.14);
}

.pfc-col-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    padding: 0;
    line-height: 1;
    color: var(--pfc-main-color);
}

.pfc-col-btn:hover {
    background: rgba(17, 55, 118, 0.12);
    color: var(--pfc-main-color);
}

.pfc-col-btn.pfc-active {
    background: var(--pfc-main-color);
    color: #ffffff;
    transform: translateY(-1px);
}

.pfc-dot-grid {
    display: none;
}

.pfc-col-icon {
    display: block;
    height: 12px;
    border-radius: 2px;
    background-repeat: no-repeat;
}

.pfc-col-icon--2 {
    width: 14px;
    background-image: linear-gradient(
        to right,
        currentColor 0 5px,
        transparent 5px 9px,
        currentColor 9px 14px
    );
}

.pfc-col-icon--3 {
    width: 16px;
    background-image: linear-gradient(
        to right,
        currentColor 0 4px,
        transparent 4px 6px,
        currentColor 6px 10px,
        transparent 10px 12px,
        currentColor 12px 16px
    );
}

.pfc-col-icon--4 {
    width: 18px;
    background-image: linear-gradient(
        to right,
        currentColor 0 3px,
        transparent 3px 5px,
        currentColor 5px 8px,
        transparent 8px 10px,
        currentColor 10px 13px,
        transparent 13px 15px,
        currentColor 15px 18px
    );
}

.pfc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   Grid
   ============================================================ */

.pfc-grid {
    display: grid;
    gap: 28px;
}

.pfc-grid.pfc-col-1 { grid-template-columns: 1fr; }
.pfc-grid.pfc-col-2 { grid-template-columns: repeat(2, 1fr); }
.pfc-grid.pfc-col-3 { grid-template-columns: repeat(3, 1fr); }
.pfc-grid.pfc-col-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   Card  –  구조:
     .pfc-card
       .pfc-card__img-wrap
         img  |  .pfc-card__placeholder
         .pfc-card__overlay
           .pfc-card__category     ← "지스타 B2B" (소형 굵은)
           .pfc-card__title        ← "SPACE DELTA" (초대형)
       .pfc-card__divider
       .pfc-card__body
         .pfc-card__desc
         .pfc-card__tags
   ============================================================ */

.pfc-card {
    background: #ffffff;
    overflow: hidden;
    box-shadow: none;
}

/* ---- 이미지 래퍼 ---- */
.pfc-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #090b14;
}

.pfc-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.96) saturate(1) contrast(1.02);
    transition: filter 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    z-index: 1;
}

.pfc-card__img-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.14);
    transition: background-color 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 2;
    pointer-events: none;
}

.pfc-card:hover .pfc-card__img-wrap img {
    filter: grayscale(70%) saturate(0.55) brightness(0.9) contrast(1.03);
}

.pfc-card:hover .pfc-card__img-wrap::after {
    background: rgba(0, 0, 0, 0.28);
}

/* 이미지 없을 때 플레이스홀더 */
.pfc-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(155deg, #0a0a1c 0%, #0f1530 55%, #0b1e42 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a3a5c;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.05em;
}

/* ---- 이미지 위 텍스트 오버레이 ---- */
.pfc-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.86) 35%,
        rgba(0, 0, 0, 0.50) 62%,
        rgba(0, 0, 0, 0.15) 82%,
        transparent 100%
    );
    padding: 86px 22px 22px 22px;
    z-index: 3;
    text-align: left !important;
}

/* "지스타 B2B" */
.pfc-card__category {
    display: block;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: 17px;
    color: #ffffff !important;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-align: left !important;
}

/* "SPACE DELTA" */
.pfc-card__title {
    display: block;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 900;
    font-size: clamp(38px, 5vw, 64px);
    color: #ffffff !important;
    letter-spacing: -0.03em;
    line-height: 0.98;
    text-transform: uppercase;
    margin-bottom: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    text-align: left !important;
}

.pfc-card__overlay-divider {
    display: block;
    width: min(320px, 100%);
    height: 1px;
    background: rgba(255, 255, 255, 0.85);
    margin: 0 0 14px 0;
}

.pfc-card__desc {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.45;
    margin-bottom: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    text-align: left !important;
}

.pfc-card__tags {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.65;
    word-break: break-word;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    text-align: left !important;
}

.pfc-wrapper .pfc-card__overlay,
.pfc-wrapper .pfc-card__overlay * {
    text-align: left !important;
}

.pfc-wrapper .pfc-card__overlay a,
.pfc-wrapper .pfc-card__overlay p,
.pfc-wrapper .pfc-card__overlay span {
    color: #ffffff !important;
}

/* ---- Empty ---- */
.pfc-no-cards {
    font-family: 'Noto Sans KR', sans-serif;
    color: #aaa;
    text-align: center;
    padding: 48px 0;
    font-size: 14px;
}

/* ============================================================
   열 수에 따른 타이틀 크기 조정
   ============================================================ */

.pfc-col-3 .pfc-card__title {
    font-size: clamp(24px, 3.4vw, 44px);
}

.pfc-col-4 .pfc-card__title {
    font-size: clamp(18px, 2.4vw, 32px);
}

.pfc-col-4 .pfc-card__category {
    font-size: 13px;
}

.pfc-col-4 .pfc-card__overlay {
    padding: 60px 14px 16px 14px;
}

.pfc-col-4 .pfc-card__overlay-divider {
    margin-bottom: 8px;
}

.pfc-col-4 .pfc-card__desc {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.pfc-col-4 .pfc-card__tags {
    font-size: 11px;
    line-height: 1.5;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1100px) {
    .pfc-grid.pfc-col-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .pfc-grid.pfc-col-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .pfc-grid.pfc-col-2,
    .pfc-grid.pfc-col-3,
    .pfc-grid.pfc-col-4 {
        grid-template-columns: 1fr;
    }

    .pfc-card__title {
        font-size: 40px !important;
        white-space: normal;
    }

    .pfc-card__category {
        font-size: 16px;
    }

    .pfc-card__overlay {
        padding: 70px 16px 16px 16px;
    }

    .pfc-card__desc {
        font-size: 14px;
        line-height: 1.5;
    }

    .pfc-card__tags {
        font-size: 12px;
        line-height: 1.5;
    }
}
