@charset "UTF-8";

/* =========================================
   1. Portfolio Header (Image Background)
   ========================================= */

/* 헤더 전체 영역 */
.page-header-simple {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
    padding: 200px 0 80px;
    color: #fff;
    position: relative;
}

/* 헤더 레이아웃 */
.pf-header-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 30px;
    margin-bottom: 0;
}

.pf-category-badge {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: 3px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.pf-big-title {
    font-size: 80px;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -2px;
    color: #fff;
    margin: 0;
    font-family: 'Pretendard', sans-serif;
}

.pf-header-desc {
    text-align: right;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 5px;
    word-break: keep-all;
}

/* =========================================
   2. Filter Navigation (Pill Style)
   ========================================= */

.filter-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 80px;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 42px;
    border-radius: 50px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #666;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.filter-pill:hover {
    background: #fff;
    color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.05);
}

.filter-pill.active {
    background: #111;
    color: #fff;
    border-color: #111;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* =========================================
   3. Portfolio Grid & Item
   ========================================= */

/* 2열 전용 그리드 */
.pf-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 40px;
}

/* 일반 자동 반응형 그리드 (기본) */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.pf-item {
    display: block;
    position: relative;
    background: transparent;
    /* [중요] 그리드 내에서 텍스트 길어질 때 레이아웃 깨짐 방지 */
    min-width: 0;
}

.pf-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #f4f4f4;
}

.pf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
}

.pf-item:hover .pf-thumb img {
    transform: scale(1.08);
}

.pf-meta {
    margin-top: 24px;
    padding: 0 5px;
}

.pf-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    /* Fixed color for dark theme */
    margin-bottom: 8px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.pf-desc {
    font-size: 16px;
    color: #ccc;
    font-weight: 400;
}

/* Fixed color for dark theme */

.pf-item:hover .pf-title {
    color: var(--accent-color);
    transition: 0.3s;
}

/* =========================================
   4. Modal & ETC
   ========================================= */
.pf-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pf-modal-overlay.active {
    display: flex;
    opacity: 1;
    justify-content: center;
    align-items: center;
}

.pf-modal-wrap {
    width: 90%;
    max-width: 1200px;
    height: 85%;
    background: #fff;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.pf-modal-overlay.active .pf-modal-wrap {
    transform: translateY(0);
}

.pf-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.pf-modal-close:hover {
    background: var(--accent-color);
    transform: rotate(90deg);
}

.pf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.btn-more {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 15px 50px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-more:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

/* =========================================
   6. Responsive (Mobile Optimization)
   ========================================= */

@media (max-width: 768px) {

    /* 헤더 세로 배치 */
    .pf-header-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-bottom: 30px;
    }

    .pf-big-title {
        font-size: 48px;
    }

    .pf-header-desc {
        text-align: left;
        font-size: 15px;
    }

    /* [필터 버튼] 가운데 정렬 & 여백 */
    .filter-nav {
        margin-top: 20px;
        margin-bottom: 30px;
        gap: 8px;
        padding: 0 5px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-pill {
        padding: 10px 16px;
        font-size: 13px;
        flex-shrink: 0;
        white-space: nowrap;
        box-shadow: none !important;
        border: 1px solid #eee;
        background-color: #f9f9f9;
    }

    .filter-pill.active {
        background: #111;
        border-color: #111;
        color: #fff;
        box-shadow: none !important;
    }

    /* [수정됨] 그리드에 좌우 여백(Padding) 추가 */
    .pf-grid,
    .pf-grid-2col {
        display: grid;
        grid-template-columns: 1fr 1fr !important;
        gap: 24px 15px;
        /* 세로, 가로 간격 */

        /* [핵심] 좌우 여백 추가하여 화면 끝에서 띄움 */
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box;
    }

    /* [여백 통일] 불필요한 상단 여백 제거 */
    .section-padding.container[style] {
        padding-top: 0 !important;
    }

    /* 텍스트 크기 조정 */
    .pf-meta {
        margin-top: 12px;
    }

    .pf-title {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .pf-desc {
        font-size: 12px;
    }

    .pf-thumb {
        border-radius: 10px;
    }
}