/* ============================================================
   더프라임 블로그 테마 — 전용 스타일
   (styles.css + premium-redesign.css 로드 후 적용)
   ============================================================ */

/* 공통 */
.tp-blog-main {
    background: #F8FAFC;
    min-height: 80vh;
}

/* ======================
   카테고리 아카이브 히어로
   ====================== */
.tp-archive-hero {
    background: #ffffff;
    padding: 64px 0 40px;
    border-bottom: 1px solid #E5E7EB;
}
.tp-archive-hero-inner {
    text-align: center;
}
.tp-archive-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #111111;
    margin: 12px 0 10px;
    line-height: 1.3;
    letter-spacing: -0.03em;
}
.tp-archive-desc {
    font-size: 15px;
    color: #555555;
    margin-bottom: 28px;
}

/* 카테고리 탭 */
.tp-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.tp-cat-tab {
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #555555;
    background: #F1F5F9;
    border: 1px solid #E5E7EB;
    text-decoration: none;
    transition: all 0.2s;
}
.tp-cat-tab:hover,
.tp-cat-tab.active {
    background: #FEB813;
    color: #111111;
    border-color: #FEB813;
}

/* ======================
   포스팅 그리드
   ====================== */
.tp-grid-section {
    padding: 56px 0 64px;
}
.tp-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* 카드 */
.tp-post-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.22s, box-shadow 0.22s;
    display: flex;
    flex-direction: column;
}
.tp-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}
.tp-card-img-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.tp-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}
.tp-post-card:hover .tp-card-thumb {
    transform: scale(1.04);
}
.tp-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FEB813 0%, #FF9500 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.8rem;
    aspect-ratio: 16 / 9;
}
.tp-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.tp-card-meta-top {
    margin-bottom: 8px;
}
.tp-card-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #FEB813;
    background: rgba(254,184,19,0.12);
    border-radius: 4px;
    padding: 3px 9px;
    letter-spacing: 0.02em;
}
.tp-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    line-height: 1.5;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tp-card-title a {
    color: inherit;
    text-decoration: none;
}
.tp-card-title a:hover { color: #FEB813; }
.tp-card-excerpt {
    font-size: 13px;
    color: #555555;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 16px;
}
.tp-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F1F5F9;
    padding-top: 12px;
    font-size: 12px;
    color: #888888;
}
.tp-card-date { display: flex; align-items: center; gap: 4px; }
.tp-card-readmore {
    color: #FEB813;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
}

/* 페이지네이션 */
.tp-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}
.tp-pagination .nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
}
.tp-pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    text-decoration: none;
    transition: all 0.2s;
}
.tp-pagination .page-numbers:hover,
.tp-pagination .page-numbers.current {
    background: #FEB813;
    border-color: #FEB813;
    color: #111111;
}

/* 빈 상태 */
.tp-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #888888;
}
.tp-empty-state i {
    font-size: 3.5rem;
    color: #FEB813;
    display: block;
    margin-bottom: 16px;
}
.tp-empty-state p {
    font-size: 16px;
    line-height: 1.8;
    color: #666666;
}

/* ======================
   하단 CTA 배너
   ====================== */
.tp-blog-cta {
    background: #111111;
    padding: 40px 0;
}
.tp-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.tp-cta-label {
    font-size: 12px;
    font-weight: 600;
    color: #FEB813;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.tp-cta-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
}
.tp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #FEB813;
    color: #111111;
    font-size: 15px;
    font-weight: 800;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    letter-spacing: -0.01em;
}
.tp-cta-btn:hover {
    background: #ffffff;
    color: #111111;
}

/* ======================
   단일 포스트 (single.php)
   ====================== */
.tp-single-main { background: #F8FAFC; }

/* 포스트 히어로 */
.tp-post-hero {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.tp-post-hero-img {
    position: absolute;
    inset: 0;
}
.tp-hero-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.65) 100%);
}
.tp-post-hero-gradient {
    background: linear-gradient(135deg, #111111 0%, #2d2d2d 100%);
}
.tp-post-hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 40px;
    padding-top: 100px;
    width: 100%;
}

/* 브레드크럼 */
.tp-breadcrumb {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
}
.tp-breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}
.tp-breadcrumb a:hover { color: #FEB813; }
.tp-breadcrumb span { color: rgba(255,255,255,0.5); }

.tp-post-title {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.35;
    letter-spacing: -0.03em;
    margin: 0 0 14px;
    max-width: 780px;
}
.tp-post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
}
.tp-meta-cat,
.tp-meta-date {
    display: flex;
    align-items: center;
    gap: 5px;
}
.tp-meta-cat { color: #FEB813; font-weight: 700; }

/* 포스트 레이아웃 (본문 + 사이드바) */
.tp-post-body-section { padding: 56px 0 64px; }
.tp-post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* 본문 */
.tp-post-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 48px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    font-size: 16px;
    line-height: 1.9;
    color: #333333;
}
.tp-post-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111111;
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #FEB813;
}
.tp-post-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111111;
    margin: 28px 0 10px;
}
.tp-post-content p { margin-bottom: 18px; color: #333333; }
.tp-post-content ul,
.tp-post-content ol {
    padding-left: 20px;
    margin-bottom: 18px;
    color: #333333;
}
.tp-post-content li { margin-bottom: 6px; }
.tp-post-content strong { color: #111111; font-weight: 700; }
.tp-post-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}
.tp-post-content blockquote {
    border-left: 4px solid #FEB813;
    background: #FFFBEB;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #555555;
    font-style: italic;
}
.tp-post-content a { color: #FEB813; text-decoration: underline; }

/* 태그 */
.tp-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 0;
    padding-top: 24px;
    border-top: 1px solid #F1F5F9;
}
.tp-tag {
    padding: 5px 12px;
    background: #F1F5F9;
    border-radius: 50px;
    font-size: 12px;
    color: #555555;
    text-decoration: none;
    transition: all 0.2s;
}
.tp-tag:hover { background: #FEB813; color: #111111; }

/* 이전/다음 글 내비게이션 */
.tp-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F1F5F9;
}
.tp-post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}
.tp-post-nav-item:hover { border-color: #FEB813; background: #FFFBEB; }
.tp-nav-prev { align-items: flex-start; }
.tp-nav-next { align-items: flex-end; text-align: right; }
.tp-nav-dir { font-size: 11px; font-weight: 700; color: #FEB813; }
.tp-nav-title { font-size: 13px; font-weight: 600; color: #333333; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 사이드바 */
.tp-post-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 사이드바 CTA */
.tp-sidebar-cta {
    background: #111111;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
}
.tp-sidebar-cta-icon {
    width: 52px;
    height: 52px;
    background: #FEB813;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.5rem;
    color: #111111;
}
.tp-sidebar-cta-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}
.tp-sidebar-cta-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 16px;
}
.tp-sidebar-cta-btn {
    display: block;
    padding: 13px;
    background: #FEB813;
    color: #111111;
    font-size: 15px;
    font-weight: 800;
    border-radius: 50px;
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.tp-sidebar-cta-btn:hover { background: #ffffff; }
.tp-sidebar-kakao-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s;
}
.tp-sidebar-kakao-btn:hover { background: rgba(255,255,255,0.15); }

/* 관련 글 */
.tp-sidebar-related,
.tp-sidebar-cats {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.tp-sidebar-related-title {
    font-size: 14px;
    font-weight: 800;
    color: #111111;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FEB813;
}
.tp-related-list { list-style: none; padding: 0; margin: 0; }
.tp-related-item { margin-bottom: 12px; }
.tp-related-link {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
}
.tp-related-thumb {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.tp-related-thumb-placeholder {
    width: 56px;
    height: 42px;
    background: linear-gradient(135deg, #FEB813, #FF9500);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.tp-related-title {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tp-related-link:hover .tp-related-title { color: #FEB813; }

/* 카테고리 목록 (사이드바) */
.tp-cat-list { list-style: none; padding: 0; margin: 0; }
.tp-cat-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #444444;
    text-decoration: none;
    border-bottom: 1px solid #F1F5F9;
    transition: color 0.15s;
}
.tp-cat-link:hover { color: #FEB813; }
.tp-cat-count {
    margin-left: auto;
    font-size: 11px;
    background: #F1F5F9;
    border-radius: 20px;
    padding: 1px 8px;
    color: #888;
}

/* ======================
   반응형 (태블릿 / 모바일)
   ====================== */
@media (max-width: 1024px) {
    .tp-post-grid { grid-template-columns: repeat(2, 1fr); }
    .tp-post-layout { grid-template-columns: 1fr; }
    .tp-post-sidebar { position: static; }
}

@media (max-width: 768px) {
    .tp-archive-hero { padding: 48px 0 32px; }
    .tp-archive-title { font-size: 1.6rem; }
    .tp-post-grid { grid-template-columns: 1fr; }
    .tp-cta-inner { flex-direction: column; text-align: center; }
    .tp-cta-title { font-size: 1.1rem; }
    .tp-post-hero { min-height: 260px; }
    .tp-post-title { font-size: 1.35rem; }
    .tp-post-content { padding: 28px 24px; font-size: 15px; }
    .tp-post-nav { grid-template-columns: 1fr; }
    .tp-nav-next { align-items: flex-start; text-align: left; }
}
