/*
 Theme Name:   Jeepers & Creepers Child
 Theme URI:    https://jeepersandcreepers.com
 Description:  GeneratePress 차일드 테마 – 다크 누아르 스타일 커스텀 헤더/푸터/파비콘
 Author:       김박사
 Author URI:   https://jeepersandcreepers.com
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  jeepers-child
*/

/* ==========================================================================
   1. CSS 변수 (누아르 팔레트)
   ========================================================================== */
:root {
    --jc-bg-primary: #0a0a0a;
    --jc-bg-secondary: #111111;
    --jc-bg-tertiary: #1a1a1a;
    --jc-border: #2a2a2a;
    --jc-border-accent: #333333;
    --jc-text-primary: #d0d0d0;
    --jc-text-secondary: #888888;
    --jc-text-muted: #555555;
    --jc-accent: #8a0303;
    --jc-accent-hover: #b30404;
    --jc-accent-soft: rgba(138, 3, 3, 0.15);
    --jc-white: #e8e8e8;
    --jc-header-height: 70px;
    --jc-transition: 0.25s ease;
}

/* ==========================================================================
   2. 전역 오버라이드
   ========================================================================== */
body {
    background-color: var(--jc-bg-primary) !important;
    color: var(--jc-text-primary) !important;
}

a {
    color: var(--jc-accent) !important;
    text-decoration: none !important;
    transition: color var(--jc-transition);
}

a:hover,
a:focus {
    color: var(--jc-accent-hover) !important;
}

/* ==========================================================================
   3. 커스텀 헤더
   ========================================================================== */
.jc-header {
    background: var(--jc-bg-secondary);
    border-bottom: 1px solid var(--jc-border);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0;
}

/* 어드민바 보정 */
.admin-bar .jc-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .jc-header {
        top: 46px;
    }
}

.jc-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--jc-header-height);
}

/* 로고 영역 */
.jc-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    flex-shrink: 0;
}

.jc-logo svg {
    width: 36px;
    height: 36px;
}

.jc-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.jc-logo-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--jc-white) !important;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.jc-logo-tagline {
    font-size: 0.7rem;
    color: var(--jc-text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 네비게이션 */
.jc-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.jc-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.jc-nav-item {
    position: relative;
}

.jc-nav-link {
    display: block;
    padding: 0 18px;
    height: var(--jc-header-height);
    line-height: var(--jc-header-height);
    color: var(--jc-text-secondary) !important;
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: color var(--jc-transition), background var(--jc-transition);
    white-space: nowrap;
}

.jc-nav-link:hover,
.jc-nav-item:hover > .jc-nav-link {
    color: var(--jc-white) !important;
    background: var(--jc-accent-soft);
}

/* 카테고리 드롭다운 */
.jc-nav-item.jc-has-dropdown > .jc-nav-link::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 6px;
    vertical-align: middle;
    transition: transform var(--jc-transition);
}

.jc-nav-item.jc-has-dropdown:hover > .jc-nav-link::after {
    transform: rotate(180deg);
}

.jc-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--jc-bg-secondary);
    border: 1px solid var(--jc-border);
    border-top: 2px solid var(--jc-accent);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--jc-transition), transform var(--jc-transition), visibility var(--jc-transition);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.jc-nav-item.jc-has-dropdown:hover > .jc-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jc-dropdown li {
    margin: 0;
}

.jc-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--jc-text-secondary) !important;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    transition: background var(--jc-transition), color var(--jc-transition), padding-left var(--jc-transition);
}

.jc-dropdown a:hover {
    background: var(--jc-accent-soft);
    color: var(--jc-white) !important;
    padding-left: 26px;
}

/* 모바일 토글 */
.jc-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--jc-border);
    color: var(--jc-text-secondary);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: border-color var(--jc-transition), color var(--jc-transition);
}

.jc-mobile-toggle:hover {
    border-color: var(--jc-accent);
    color: var(--jc-white);
}

.jc-mobile-toggle svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 6px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .jc-mobile-toggle {
        display: inline-flex;
        align-items: center;
    }

    .jc-nav {
        display: none;
        position: absolute;
        top: var(--jc-header-height);
        left: 0;
        right: 0;
        background: var(--jc-bg-secondary);
        border-bottom: 1px solid var(--jc-border);
        border-top: 1px solid var(--jc-border);
        flex-direction: column;
        padding: 10px 0;
    }

    .jc-nav.jc-nav-open {
        display: flex;
    }

    .jc-nav-list {
        flex-direction: column;
        width: 100%;
    }

    .jc-nav-link {
        height: auto;
        line-height: 1.4;
        padding: 12px 20px;
    }

    .jc-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        border-top: none;
        box-shadow: none;
        background: var(--jc-bg-tertiary);
        min-width: 100%;
        display: none;
    }

    .jc-nav-item.jc-has-dropdown.jc-dropdown-open > .jc-dropdown {
        display: block;
    }

    .jc-logo-tagline {
        display: none;
    }
}

/* ==========================================================================
   4. 커스텀 푸터
   ========================================================================== */
.jc-footer {
    background: var(--jc-bg-secondary);
    border-top: 1px solid var(--jc-border);
    margin-top: 40px;
}

.jc-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px 30px;
}

.jc-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--jc-border);
}

.jc-footer-brand {
    max-width: 400px;
}

.jc-footer-brand .jc-logo {
    margin-bottom: 16px;
}

.jc-footer-desc {
    font-size: 0.88rem;
    color: var(--jc-text-secondary);
    line-height: 1.7;
    margin: 0;
}

.jc-footer-nav {
    display: flex;
    gap: 40px;
}

.jc-footer-col h4 {
    color: var(--jc-white);
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--jc-accent);
    display: inline-block;
}

.jc-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jc-footer-col li {
    margin-bottom: 8px;
}

.jc-footer-col a {
    color: var(--jc-text-secondary) !important;
    font-size: 0.85rem;
    transition: color var(--jc-transition);
}

.jc-footer-col a:hover {
    color: var(--jc-white) !important;
}

.jc-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 0;
}

.jc-copyright {
    font-size: 0.78rem;
    color: var(--jc-text-muted);
    letter-spacing: 0.5px;
}

.jc-footer-credit {
    font-size: 0.72rem;
    color: var(--jc-text-muted);
    letter-spacing: 0.5px;
}

.jc-footer-credit a {
    color: var(--jc-text-muted) !important;
}

.jc-footer-credit a:hover {
    color: var(--jc-accent) !important;
}

@media (max-width: 768px) {
    .jc-footer-top {
        flex-direction: column;
        gap: 30px;
    }

    .jc-footer-nav {
        flex-direction: column;
        gap: 24px;
    }

    .jc-footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ==========================================================================
   5. 기존 GeneratePress 요소 숨김
   ========================================================================== */
header#masthead,
.site-footer {
    display: none !important;
}

/* ==========================================================================
   6. 콘텐츠 영역 미세 조정
   ========================================================================== */
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation {
    background-color: var(--jc-bg-secondary) !important;
    border: 1px solid var(--jc-border);
}

.sidebar .widget {
    background-color: var(--jc-bg-secondary) !important;
    border: 1px solid var(--jc-border);
}

.entry-title a {
    color: var(--jc-white) !important;
}

.entry-title a:hover {
    color: var(--jc-accent) !important;
}

.entry-meta {
    color: var(--jc-text-muted) !important;
}

.paging-navigation a {
    color: var(--jc-text-secondary) !important;
}

.paging-navigation a:hover {
    color: var(--jc-accent) !important;
}

/* ==========================================================================
   7. 커스텀 사이드바
   ========================================================================== */

/* 위젯 공통 스타일 */
.jc-widget {
    background: var(--jc-bg-secondary) !important;
    border: 1px solid var(--jc-border) !important;
    padding: 0 !important;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 위젯 헤더 */
.jc-widget-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--jc-border);
}

.jc-widget-tag {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--jc-accent);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.jc-widget-title {
    font-size: 1rem;
    color: var(--jc-white);
    margin: 0;
    padding: 0;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ─── OBSERVER 프로필 카드 ─── */
.jc-observer-card {
    text-align: center;
    padding: 30px 24px 24px !important;
    position: relative;
}

.jc-observer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--jc-accent), transparent);
}

.jc-observer-eye {
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.jc-observer-eye::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--jc-accent-soft) 0%, transparent 70%);
    animation: jc-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes jc-pulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.15); }
}

.jc-observer-label {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--jc-accent);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
}

.jc-observer-name {
    font-size: 1.05rem;
    color: var(--jc-white);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.jc-observer-bio {
    font-size: 0.82rem;
    color: var(--jc-text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    padding: 0 8px;
}

.jc-observer-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    border-top: 1px solid var(--jc-border);
    margin: 0 -24px -24px;
    padding: 0;
}

.jc-stat {
    flex: 1;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.jc-stat + .jc-stat {
    border-left: 1px solid var(--jc-border);
}

.jc-stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--jc-white);
    font-family: 'Courier New', monospace;
}

.jc-stat-label {
    font-size: 0.68rem;
    color: var(--jc-text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ─── 최근 관찰 (넘버링) ─── */
.jc-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jc-recent-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--jc-border);
    transition: background var(--jc-transition);
}

.jc-recent-item:last-child {
    border-bottom: none;
}

.jc-recent-item:hover {
    background: var(--jc-accent-soft);
}

.jc-recent-num {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--jc-border-accent);
    line-height: 1;
    min-width: 28px;
    transition: color var(--jc-transition);
}

.jc-recent-item:hover .jc-recent-num {
    color: var(--jc-accent);
}

.jc-recent-content {
    flex: 1;
    min-width: 0;
}

.jc-recent-link {
    display: block;
    font-size: 0.85rem;
    color: var(--jc-text-primary) !important;
    line-height: 1.5;
    transition: color var(--jc-transition);
    margin-bottom: 4px;
}

.jc-recent-item:hover .jc-recent-link {
    color: var(--jc-white) !important;
}

.jc-recent-date {
    font-size: 0.7rem;
    color: var(--jc-text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ─── 분석 영역 (바 차트 카테고리) ─── */
.jc-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jc-cat-item {
    padding: 14px 24px;
    border-bottom: 1px solid var(--jc-border);
    transition: background var(--jc-transition);
}

.jc-cat-item:last-child {
    border-bottom: none;
}

.jc-cat-item:hover {
    background: var(--jc-accent-soft);
}

.jc-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none !important;
    margin-bottom: 8px;
}

.jc-cat-name {
    font-size: 0.85rem;
    color: var(--jc-text-primary);
    transition: color var(--jc-transition);
}

.jc-cat-item:hover .jc-cat-name {
    color: var(--jc-white);
}

.jc-cat-count {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    color: var(--jc-text-muted);
    background: var(--jc-bg-tertiary);
    padding: 2px 8px;
    border-radius: 2px;
    min-width: 20px;
    text-align: center;
}

.jc-cat-bar {
    height: 3px;
    background: var(--jc-bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.jc-cat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--jc-accent), var(--jc-accent-hover));
    border-radius: 2px;
    transition: width 0.6s ease;
    min-width: 4px;
}

/* ─── 키워드 태그 클라우드 ─── */
.jc-tag-cloud {
    padding: 16px 24px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jc-tag-item {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--jc-text-secondary) !important;
    background: var(--jc-bg-tertiary);
    border: 1px solid var(--jc-border);
    padding: 5px 12px;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: all var(--jc-transition);
}

.jc-tag-item:hover {
    color: var(--jc-white) !important;
    border-color: var(--jc-accent);
    background: var(--jc-accent-soft);
}

/* ─── 경고 디스클레이머 ─── */
.jc-disclaimer-widget {
    background: var(--jc-bg-primary) !important;
    border: 1px solid var(--jc-border) !important;
    border-left: 3px solid var(--jc-accent) !important;
    padding: 20px 22px !important;
}

.jc-disclaimer-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.jc-disclaimer-icon span {
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--jc-accent);
    font-weight: 700;
    text-transform: uppercase;
}

.jc-disclaimer-text {
    font-size: 0.8rem;
    color: var(--jc-text-secondary);
    line-height: 1.7;
    margin: 0 0 14px 0;
}

.jc-disclaimer-helpline {
    font-size: 0.78rem;
    color: var(--jc-text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--jc-border);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.jc-disclaimer-helpline strong {
    color: var(--jc-white);
    font-size: 0.9rem;
}

/* ─── 기존 WP 위젯 스타일 오버라이드 ─── */
.sidebar .widget:not(.jc-widget) {
    background: var(--jc-bg-secondary) !important;
    border: 1px solid var(--jc-border) !important;
    display: none; /* 기본 WP 위젯 숨김 — 커스텀 위젯만 표시 */
}
