/* =========================================================
   FI Magazine Full View - Dedicated Styles (Final v4.0)
   Features: Dark Mode, Bento Grid, Noir-to-Color Hover
   ========================================================= */

:root {
    --bg-void: #050505;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #FFFFFF;
    --text-secondary: #888888;
    --accent-neon: #D4FF00;
    --font-display: 'Clash Display', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* 1. 기본 설정 (테마 간섭 차단 & 다크모드 강제) */
body.page-template-page-fi-magazine-full,
body.post-template-single-fi-magazine {
    background-color: var(--bg-void) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-body) !important;
    margin: 0; padding: 0;
    overflow-x: hidden;
    cursor: none !important; /* 시스템 마우스 숨김 */
}

/* 링크 및 버튼 커서 제거 (커스텀 커서 사용) */
.page-template-page-fi-magazine-full a, 
.page-template-page-fi-magazine-full button, 
.page-template-page-fi-magazine-full .card,
.post-template-single-fi-magazine a,
.post-template-single-fi-magazine button,
.post-template-single-fi-magazine .article-featured-img { 
    cursor: none !important; 
}

/* 2. 커스텀 커서 (반전 효과) */
.cursor-dot, .cursor-circle {
    position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
    border-radius: 50%; pointer-events: none; z-index: 999999; mix-blend-mode: difference;
}
.cursor-dot { width: 8px; height: 8px; background: white; display: block !important; }
.cursor-circle { width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.8); transition: width 0.3s, height 0.3s, border-color 0.3s; display: block !important; }
body.hovered .cursor-circle { width: 80px; height: 80px; background: rgba(255, 255, 255, 0.1); border-color: transparent; }

/* 3. 레이아웃 & 헤더 */
.fi-container { max-width: 1600px; margin: 0 auto; padding: 0 4vw; }

header.fi-header {
    position: fixed; top: 0; width: 100%; z-index: 100; padding: 2rem 0; mix-blend-mode: exclusion;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: #fff !important; text-decoration: none; text-transform: uppercase; }
.nav-menu { display: flex; gap: 2rem; }
.nav-item { color: #fff !important; text-decoration: none; text-transform: uppercase; font-size: 0.9rem; opacity: 0.7; transition: opacity 0.3s, color 0.3s; }
.nav-item:hover { opacity: 1; color: var(--accent-neon) !important; }

/* Hero Section (타이포그래피) */
.hero { height: 60vh; display: flex; align-items: center; margin-top: 80px; position: relative; }
.hero h1 { 
    font-family: var(--font-display); font-size: clamp(3rem, 9vw, 8rem); line-height: 0.9; 
    font-weight: 600; text-transform: uppercase; margin-bottom: 2rem; color: #ffffff !important;
}
.hero-meta { 
    display: flex; gap: 30px; border-top: 1px solid var(--border-glass); padding-top: 2rem; margin-top: 2rem; 
    color: var(--text-secondary) !important; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em; 
}

/* 4. Bento Grid Card Style */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; }

.card {
    background: var(--bg-card); 
    border: 1px solid var(--border-glass); 
    border-radius: 4px;
    padding: 3rem; 
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden; min-height: 50vh; 
    color: #fff !important; text-decoration: none;
    grid-column: span 4; /* 기본 Small */
    transition: border-color 0.3s ease;

    /* ★ 애니메이션 초기 상태 (JS가 등장시킴) */
    opacity: 0; 
    transform: translateY(30px);
}
.card.card-lg { grid-column: span 8; } /* Large Card */

/* 카드 호버 시 테두리 밝게 */
.card:hover { border-color: rgba(255, 255, 255, 0.4); }

/* ★★★ [핵심] 이미지 처리: Noir to Color ★★★ */
.card-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 110%; /* 파랄랙스 여유분 */
    object-fit: cover; z-index: 0; 
    
    /* 기본 상태: 어둡고(0.4) + 흑백(100%) */
    opacity: 0.4; 
    filter: grayscale(100%); 
    
    /* 부드러운 전환 효과 (0.5초) */
    transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
}

/* 마우스 올렸을 때: 밝아지고(0.6) + 컬러(0%) + 살짝 확대 */
.card:hover .card-img { 
    opacity: 0.6; 
    filter: grayscale(0%); /* 컬러 복구! */
    transform: scale(1.02); /* 아주 살짝 줌인 */
}

/* 카드 내용물 스타일 */
.card-content { position: relative; z-index: 2; pointer-events: none; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.card-tag { font-size: 0.75rem; color: var(--accent-neon) !important; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; display: block; }
.card-title { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; margin: 0 0 1.5rem 0; font-weight: 500; color: #ffffff !important; }

/* 메타 정보 (날짜, 조회수) */
.card-meta-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.85rem; color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px; margin-top: auto;
}
.meta-views { display: flex; align-items: center; gap: 4px; color: #fff; }
.meta-views svg { opacity: 0.8; }
.meta-sep { opacity: 0.3; }

/* Pagination */
.fi-pagination { margin-top: 5rem; display: flex; gap: 1rem; justify-content: center; width: 100%; }
.fi-pagination a, .fi-pagination span {
    padding: 10px 20px; border: 1px solid var(--border-glass); color: #fff !important; border-radius: 100px; text-decoration: none; transition: all 0.3s;
}
.fi-pagination a:hover, .fi-pagination span.current { border-color: var(--accent-neon); color: var(--accent-neon) !important; background: rgba(212, 255, 0, 0.05); }

/* =========================================================
   Footer Styling (Full Policy Links)
   ========================================================= */
footer { 
    padding: 5rem 0 3rem; 
    border-top: 1px solid var(--border-glass); 
    margin-top: 15vh; 
    background: var(--bg-void); 
    position: relative; 
    z-index: 10;
    text-align: center; /* 중앙 정렬 */
}

/* 정책 링크들 가로 배치 */
.footer-links-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links-row a {
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.footer-links-row a:hover {
    color: var(--accent-neon) !important; /* 호버시 형광색 */
}

/* 카피라이트 */
.footer-copyright-row {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

/* 모바일에서는 링크 간격 좁히기 */
@media (max-width: 768px) {
    .footer-links-row { gap: 1rem; }
    .footer-links-row a { font-size: 0.8rem; }
}