/*
Theme Name: Charlotte
Description: 3rd Vault(3rdvault.net) 전용 독립 테마.
Author: coolwarp
Update URI: false
Version: 4.0.5
*/

/* ===================================================
 * @module style | @vars --point/--strava/--text/--transition (10개)
 * @pair functions.php (enqueue 컨트롤러)
 * @flow Global root vars + base layout + blog grid
 *
 * 사용자 자주 조정 포인트:
 *   - :root --point-color: #C21807 포인트 레드
 *   - :root --strava-orange, --strava-orange-dark: Strava 계열
 *   - :root --transition, --transition-fast, --transition-ease: 타이밍/이징
 *   - 홈 그리드 max-width: 1400px
 *   - 싱글 포스트 max-width: 1100px
 * =================================================== */

/* =======================================================
   02. GLOBAL FONT
   - 폰트는 css/fonts.css 로컬 호스팅으로 대체 (jsdelivr CDN 제거)
   - PHP가 놓치는 구석을 위한 CSS 방어막
======================================================= */
body {
    font-family: 'Pretendard', sans-serif !important;
}

/* 사이트 타이틀 (블로그 이름) 폰트 적용 */
.site-title,
.site-title a {
    font-family: 'Rockstar-ExtraBold', sans-serif !important;
}


/* =======================================================
   03. VARIABLES & RESET
======================================================= */
:root {
    --point-color: #C21807;
    --strava-orange: #FC4C02;
    --strava-orange-dark: #c33a01;
    --text-black: #111111;
    --text-gray: #666666;
    --line-light: #e5e5e5;
    --bg-light: #f9f9f9;
    --transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: all 0.25s ease;
    --transition-ease: cubic-bezier(0.25, 1, 0.5, 1);
}


/* =======================================================
   04. GLOBAL LAYOUT & BLOG GRID
======================================================= */
/* .single-post 컨테이너(1100px)는 css/vault-single.css (.vault-wrap--full) 로 이전 — 포쓰 3.3 D2 */

/* 홈 그리드 열 간격 32px 은 css/vault-list.css (.vault-grid--home) 로 이전, .blog .ct-post-card 계열은 렌더에 없어 삭제 — 포쓰 3.4 D1 */

/* .blog .ct-image-container 규칙은 렌더에 없어 삭제 — 포쓰 3.4 D4 */

.blog article {
    transition: var(--transition-fast);
}

.blog article:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}


/* =======================================================
   05. POST META
======================================================= */

/* 메타 슬래시(/) 강제 제거 */
.entry-meta[data-type*="slash"] li::after {
    display: none !important;
    content: none !important;
}

.entry-meta[data-type*="slash"] li:not(:last-child) {
    margin-inline-end: 15px !important;
}

/* 아바타 숨김 (댓글 영역 등 부모 템플릿이 출력하는 아바타 차단. 싱글 히어로 메타는 아바타를 출력하지 않음) */
.avatar,
.author-avatar img,
img[src*="gravatar.com"] {
    display: none !important;
}

/* 본문 문단 양끝 정렬 */
.single-post .entry-content p {
    text-align: justify;
    text-justify: inter-character;
}


/* =======================================================
   06. POST CONTENT: BASE TYPOGRAPHY
   - 본문 텍스트 기본 설정
   - 텍스트 요소: max-width 900px 중앙 정렬
   - 이미지: 전체 폭 사용
======================================================= */
.entry-content {
    font-size: 18px;
    line-height: 1.75;
    letter-spacing: -0.01em;
}

.entry-content,
.entry-content p {
    font-weight: 400;
}

.entry-content p {
    margin-bottom: 1.4em;
}

.entry-content p,
.entry-content h2,
.entry-content h3,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content .wp-block-quote,
.entry-content .wp-block-pullquote {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.entry-content figure,
.entry-content img {
    max-width: 100% !important;
    height: auto !important;
}


/* =======================================================
   07. POST CONTENT: H1 TITLE
======================================================= */
.single-post h1.page-title {
    font-weight: 900 !important;
    font-size: 45px !important;
    letter-spacing: -0.04em !important;
    margin-bottom: 0.5em !important;
    line-height: 1.2 !important;
}

@media (max-width: 768px) {
    .single-post h1.page-title {
        font-size: 30px !important;
    }
}


/* =======================================================
   08. POST CONTENT: H2 STRIP
   - 다크 배경 + 아이보리 텍스트
======================================================= */
.entry-content h2 {
    background-color: #1f1f1f;
    color: #FDFAF1 !important;
    padding: 12px 20px;
    border-radius: 4px;
    margin-top: 2em !important;
    margin-bottom: 1em !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .entry-content h2 {
        font-size: 1.3em;
        padding: 10px 15px;
        margin-top: 1.5em !important;
    }
}


/* =======================================================
   09. ABOUT PAGE OVERRIDE
   - vault-about-page 바디 클래스 기준으로 H2 배경 제거
   - html body prefix로 최우선순위 확보
======================================================= */
html body.vault-about-page .entry-content :is(h1, h2, h3, h4),
html body.vault-about-page .vault-landing-container :is(h1, h2, h3, h4),
html body.vault-about-page .hero-title,
html body.vault-about-page .profile-name {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: var(--about-text-primary) !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    margin-top: 5px !important;
    margin-bottom: 0.5em !important;
}

/* ── 다크모드 대응 ── */
html[data-color-scheme="dark"] body.vault-about-page .entry-content :is(h1, h2, h3, h4),
html[data-color-scheme="dark"] body.vault-about-page .hero-title,
html[data-color-scheme="dark"] body.vault-about-page .profile-name {
    color: var(--about-text-primary, #f0f0ec) !important;
}


/* =======================================================
   10. POST CONTENT: DROP CAP
======================================================= */
.has-drop-cap:not(:focus)::first-letter,
.entry-content .has-drop-cap:not(:focus)::first-letter {
    float: left !important;
    font-size: 3em !important;
    font-weight: 900 !important;
    margin-top: 0.08em !important;
    margin-right: 0.1em !important;
    line-height: 1 !important;
    color: var(--dropcap-color, #b8971a);
}





/* =======================================================
   12. MENU CATEGORY COUNT
======================================================= */
.menu-category-count {
    font-size: 1em;
    color: #FC4C02;
    opacity: 0.7;
    margin-left: 8px;
    vertical-align: middle;
}


/* =======================================================
   13. GAME REVIEW — SINGLE (single-game-review.php)
======================================================= */
.single-game-review .gr-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ── B타입 헤더 ── */
.single-game-review .gr-header {
    margin-bottom: 48px;
}

.single-game-review .gr-title {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.2;
    margin: 0 0 20px;
    color: var(--gr-title, #1a1a2e);
}

/* ── 메타 행: pill + 점수 인라인 ── */
.single-game-review .gr-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gr-meta-divider, #dde1f0);
}

/* ── 점수 인라인 (오른쪽 끝 정렬) ── */
.single-game-review .gr-score-inline {
    margin-left: auto;
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}

.single-game-review .gr-score-num {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--gr-score-num, #1a1a2e);
    line-height: 1;
}

.single-game-review .gr-score-denom {
    font-size: 14px;
    font-weight: 500;
    color: var(--gr-score-denom, #9aa0b2);
}

/* ── 점수 비율 바 ── */
.single-game-review .gr-score-bar-bg {
    height: 3px !important;
    border: none !important;
    background: var(--gr-score-bar-bg, #e8eaf6);
    border-radius: 2px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.single-game-review .gr-score-bar-fill {
    height: 3px;
    background: var(--gr-score-bar-fill, #3B4FCC);
    border-radius: 2px;
}

/* h2: 기존 .entry-content h2 + max-width 해제 */
.single-game-review .entry-content h2 {
    max-width: 100% !important;
}

/* ── 원본 리뷰 이미지 ── */
.single-game-review .gr-review-image {
    margin: 0 0 2em;
}

.single-game-review .gr-review-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* ── 모바일 ── */
@media (max-width: 767px) {
    .single-game-review .gr-title {
        font-size: 26px;
    }

    .single-game-review .gr-score-num {
        font-size: 26px;
    }
}


/* =======================================================
   14. GAME REVIEW — ARCHIVE
======================================================= */
.gr-archive-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    box-sizing: border-box;
}

.gr-archive-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
    color: var(--gr-archive-title, #1a1a2e);
}

.gr-archive-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.gr-card {
    border: 0.5px solid var(--color-border-tertiary, #e0e4f0);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.gr-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-secondary, #c8cdd8);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

html[data-color-scheme="dark"] .gr-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}

@media (prefers-color-scheme: dark) {
    .gr-card:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    }
}

.gr-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ── 썸네일 이미지 영역 ── */
.gr-card-img {
    width: 100%;
    aspect-ratio: 460 / 215;
    overflow: hidden;
}

.gr-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── 썸네일 없을 때 fallback ── */
.gr-card-img--fallback {
    background: #1a2a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

.gr-card-img-fallback-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .6);
    text-align: center;
    word-break: break-word;
}

.gr-archive-empty {
    color: var(--text-muted, #999);
    text-align: center;
    padding: 60px 0;
}


/* =======================================================
   15. RESPONSIVE DESIGN
======================================================= */

/* ── 사이드패널 — 뷰포트 기준 고정으로 전환 ── */
@media (max-width: 1760px) {
    .floating-title-panel.right-panel {
        left: auto;
        right: 20px;
        margin-left: 0;
    }

    .floating-title-panel.left-panel {
        right: auto;
        left: 20px;
        margin-right: 0;
    }
}

/* ── 사이드패널 완전 숨김 ── */
@media (max-width: 1200px) {
    .floating-title-panel {
        display: none !important;
    }
}

/* ── 모바일 ── */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column !important;
        gap: 20px;
        margin-bottom: 40px;
        align-items: center !important;
    }

    .top-bar-side:first-child {
        display: none;
    }

    /* NOW 타임라인 도트 모바일 위치 */
    .now-item::after {
        left: 20px;
        top: 18px;
        transform: none;
    }

    .now-item:hover::after {
        animation: dotBreathingMobile 1.2s ease-in-out infinite;
    }
}

@keyframes dotBreathingMobile {

    0%,
    100% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(2.0);
    }
}
