/*
 * jj_project_lat / style.css
 * 경로: theme/jjtheme/skin/latest/jj_project_lat/style.css
 */

/* ── 카드 button 리셋 ── */
button.fv-proj-card {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    width: 100%;
    display: block;
    font: inherit;
    color: inherit;
}

/* ── 카드 이미지 래퍼 ── */
.fv-proj-card-img {
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fv-proj-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
    display: block;
}
.fv-proj-card:hover .fv-proj-card-img img,
.fv-proj-card:focus-visible .fv-proj-card-img img {
    transform: scale(1.06);
}

/* ── 줌 아이콘 오버레이 ── */
.jj-pj-zoom-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    opacity: 0;
    transition: opacity .25s;
    text-shadow: 0 2px 10px rgba(0,0,0,.5);
    pointer-events: none;
    background: rgba(0,0,0,.08);
}
.jj-pj-card:hover .jj-pj-zoom-icon,
.jj-pj-card:focus-visible .jj-pj-zoom-icon {
    opacity: 1;
}

/* ── 플레이스홀더 ── */
.fv-proj-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-sub);
    font-size: 32px;
    background: var(--brand-light);
}

/* ── 이미지 개수 배지 ── */
.jj-pj-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
}
.jj-pj-badge i {
    font-size: 11px;
}

/* ══════════════════════════════════════
   Magnific Popup 모달 커스텀 스타일
══════════════════════════════════════ */

.mfp-image-modal .mfp-container {
    padding: 40px 20px;
}
.mfp-image-modal .mfp-figure:after {
    box-shadow: none;
    background: rgba(0,0,0,0.7);
}
.mfp-image-modal .mfp-title {
    text-align: center;
    font-size: 14px;
    bottom: -30px;
    color: #fff;
}

/* ── ★ 닫기 버튼 (오른쪽 하단, 고정 위치) ── */
.mfp-image-modal .mfp-close {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    padding: 10px 24px !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: #fff !important;
    font-size: 0 !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    line-height: 1 !important;
    opacity: 0.85 !important;
    transition: all 0.25s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
}

.mfp-image-modal .mfp-close:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    opacity: 1 !important;
    transform: scale(1.02) !important;
}

.mfp-image-modal .mfp-close:active {
    transform: scale(0.96) !important;
}

/* ★ 닫기 버튼 아이콘 + 텍스트 (Font Awesome X + Close) */
.mfp-image-modal .mfp-close::before {
    content: 'close';
    font-family: 'Font Awesome 6 Free', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 900;
    font-size: 13px !important;
    display: inline-block;
    letter-spacing: 0.3px;
}

/* ── ★ 좌우 화살표 버튼 ── */
.mfp-image-modal .mfp-arrow {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    opacity: 0.6 !important;
    transition: all 0.25s ease !important;
    margin: 0 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mfp-image-modal .mfp-arrow:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-50%) scale(1.05) !important;
}

.mfp-image-modal .mfp-arrow:active {
    transform: translateY(-50%) scale(0.95) !important;
}

/* 왼쪽 화살표 */
.mfp-image-modal .mfp-arrow-left {
    left: 24px !important;
}

/* 오른쪽 화살표 */
.mfp-image-modal .mfp-arrow-right {
    right: 24px !important;
}

/* 화살표 아이콘 (Font Awesome) */
.mfp-image-modal .mfp-arrow:before {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-size: 20px !important;
    color: #fff !important;
    border: none !important;
    line-height: 1 !important;
    text-align: center !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
    background: none !important;
    position: static !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.mfp-image-modal .mfp-arrow-left:before {
    content: '\f053' !important;
}

.mfp-image-modal .mfp-arrow-right:before {
    content: '\f054' !important;
}

.mfp-image-modal .mfp-arrow:after {
    display: none !important;
}

/* ── 이미지 카운터 (좌상단) ── */
.mfp-image-modal .mfp-counter {
    position: fixed !important;
    top: 24px !important;
    left: 24px !important;
    right: auto !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    letter-spacing: 0.3px !important;
    z-index: 9999 !important;
}

/* ── 모바일 ── */
@media (max-width: 768px) {
    .mfp-image-modal .mfp-container {
        padding: 10px 8px;
    }
    
    .mfp-image-modal .mfp-arrow {
        width: 40px !important;
        height: 40px !important;
    }
    
    .mfp-image-modal .mfp-arrow:before {
        font-size: 16px !important;
    }
    
    .mfp-image-modal .mfp-arrow-left {
        left: 10px !important;
    }
    
    .mfp-image-modal .mfp-arrow-right {
        right: 10px !important;
    }
    
    .mfp-image-modal .mfp-close {
        bottom: 16px !important;
        right: 16px !important;
        padding: 8px 18px !important;
    }
    
    .mfp-image-modal .mfp-close::before {
        font-size: 12px !important;
    }
    
    .mfp-image-modal .mfp-counter {
        top: 14px !important;
        left: 14px !important;
        font-size: 11px !important;
        padding: 4px 12px !important;
    }
}

@media (max-width: 480px) {
    .mfp-image-modal .mfp-arrow {
        width: 34px !important;
        height: 34px !important;
    }
    
    .mfp-image-modal .mfp-arrow:before {
        font-size: 14px !important;
    }
    
    .mfp-image-modal .mfp-arrow-left {
        left: 6px !important;
    }
    
    .mfp-image-modal .mfp-arrow-right {
        right: 6px !important;
    }
    
    .mfp-image-modal .mfp-close {
        bottom: 12px !important;
        right: 12px !important;
        padding: 6px 14px !important;
    }
    
    .mfp-image-modal .mfp-close::before {
        font-size: 11px !important;
    }
}