/* ============================================================
   Growthify Law — Single Post Styles
   ============================================================ */

/* ── 포스트 레이아웃 ── */
.gl-single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: var(--gl-container);
    margin: 0 auto;
    padding: calc(var(--gl-header-h) + 40px) 24px 60px;
}

/* ── 포스트 헤더 ── */
.gl-post-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--gl-gold-light);
}

.gl-post-category-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gl-gold);
    background: var(--gl-gold-light);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.gl-post-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--gl-navy);
    line-height: 1.35;
    margin-bottom: 12px;
}

.gl-post-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--gl-text-light);
}

.gl-post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── 포스트 본문 ── */
.gl-post-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--gl-text);
    word-break: keep-all;
    overflow-wrap: break-word;
}

.gl-post-content h2 {
    font-size: 24px;
    color: var(--gl-navy);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gl-gold-light);
    font-weight: 700;
    line-height: 1.4;
}

.gl-post-content h3 {
    font-size: 20px;
    color: var(--gl-navy-light);
    margin-top: 28px;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.gl-post-content h4 {
    font-size: 18px;
    color: var(--gl-text);
    margin-top: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}

.gl-post-content p {
    margin-bottom: 16px;
}

.gl-post-content strong {
    color: var(--gl-navy);
}

.gl-post-content a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gl-post-content a:hover {
    color: #1D4ED8;
}

.gl-post-content ul,
.gl-post-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
    list-style: revert;
}

.gl-post-content li {
    margin-bottom: 6px;
    line-height: 1.75;
}

.gl-post-content img {
    border-radius: var(--gl-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 16px 0;
}

.gl-post-content blockquote {
    background: var(--gl-light);
    border-left: 3px solid var(--gl-gold);
    padding: 14px 18px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    font-style: normal;
}

/* ── 목차 (TOC) ── */
.gl-toc {
    background: var(--gl-light);
    border-radius: var(--gl-radius);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.gl-toc-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gl-navy);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gl-toc ol {
    counter-reset: toc-counter;
    list-style: none;
    padding: 0;
}

.gl-toc ol li {
    counter-increment: toc-counter;
    margin-bottom: 6px;
}

.gl-toc ol li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gl-text);
    padding: 4px 0;
    transition: color var(--gl-transition);
}

.gl-toc ol li a::before {
    content: counter(toc-counter) '.';
    font-weight: 600;
    color: var(--gl-gold);
    min-width: 20px;
}

.gl-toc ol li a:hover {
    color: var(--gl-navy);
}

/* ── 사이드바 ── */
.gl-sidebar {
    position: sticky;
    top: calc(var(--gl-header-h) + 20px);
    align-self: start;
}

.gl-widget {
    background: var(--gl-white);
    border: 1px solid var(--gl-border);
    border-radius: var(--gl-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.gl-widget-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gl-navy);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gl-gold-light);
}

/* 사이드바 CTA */
.gl-sidebar-cta {
    background: linear-gradient(135deg, var(--gl-navy), var(--gl-navy-light));
    color: var(--gl-white);
    border: none;
    text-align: center;
}

.gl-sidebar-cta .gl-widget-title {
    color: var(--gl-white);
    border-bottom-color: var(--gl-gold);
}

.gl-sidebar-cta-phone {
    font-size: 22px;
    font-weight: 800;
    color: var(--gl-gold);
    margin-bottom: 8px;
}

.gl-sidebar-cta-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
    line-height: 1.6;
}

.gl-sidebar-cta .gl-btn {
    width: 100%;
    justify-content: center;
}

/* 사이드바 관련 포스트 */
.gl-sidebar-post {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gl-border);
}

.gl-sidebar-post:last-child {
    border-bottom: none;
}

.gl-sidebar-post-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.gl-sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gl-sidebar-post-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gl-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gl-sidebar-post-date {
    font-size: 12px;
    color: var(--gl-text-muted);
    margin-top: 4px;
}

/* ── 포스트 하단 추천 ── */
.gl-related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--gl-border);
}

.gl-related-posts-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gl-navy);
    margin-bottom: 24px;
}

.gl-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── 포스트 네비게이션 ── */
.gl-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.gl-post-nav-item {
    padding: 20px;
    background: var(--gl-light);
    border-radius: var(--gl-radius);
    transition: background var(--gl-transition);
}

.gl-post-nav-item:hover {
    background: var(--gl-gold-light);
}

.gl-post-nav-label {
    font-size: 12px;
    color: var(--gl-text-muted);
    margin-bottom: 6px;
}

.gl-post-nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gl-text);
    line-height: 1.4;
}

.gl-post-nav-next {
    text-align: right;
}

/* ── 반응형 (싱글 포스트) ── */
@media (max-width: 1024px) {
    .gl-single-layout {
        grid-template-columns: 1fr;
    }

    .gl-sidebar {
        position: static;
    }

    .gl-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gl-post-title {
        font-size: 24px;
    }

    .gl-post-content {
        font-size: 16px;
    }

    .gl-post-content h2 {
        font-size: 21px;
    }

    .gl-post-content h3 {
        font-size: 18px;
    }

    .gl-related-grid {
        grid-template-columns: 1fr;
    }

    .gl-post-nav {
        grid-template-columns: 1fr;
    }
}
