/**
 * Single Post Styles - BitHub Africa Archive
 * Two-column layout with sidebar
 *
 * @package BitHub_Archive
 * @since 1.0.0
 */

/* ========================================
   LAYOUT
   ======================================== */

.single-post {
    min-height: 100vh;
    background: var(--bh-dark, #2a1a0a);
    padding: 0;
    padding-top: 100px; /* Space for fixed header */
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-4) var(--space-8);
}

@media (max-width: 900px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
}

.post-article {
    min-width: 0;
}

/* ========================================
   POST HEADER
   ======================================== */

.post-header {
    margin-bottom: var(--space-5);
}

.post-date {
    display: inline-block;
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bh-brown-light, #bd5603);
    margin-bottom: var(--space-2);
}

.post-title {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--bh-cream, #fffef8);
    margin: 0;
    text-wrap: balance;
}

/* ========================================
   FEATURED IMAGE
   ======================================== */

.post-featured-image {
    margin: 0 0 var(--space-5);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(254, 208, 158, 0.15);
}

.post-featured-image .featured-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   POST CONTENT
   ======================================== */

.post-content {
    font-family: var(--font-primary, 'Plus Jakarta Sans', sans-serif);
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 254, 248, 0.9);
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    color: var(--bh-cream, #fffef8);
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}

.post-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(254, 208, 158, 0.15);
    padding-bottom: 0.4rem;
}

.post-content h3 { font-size: 1.25rem; }
.post-content h4 { font-size: 1.1rem; }

.post-content a {
    color: var(--bh-brown-light, #bd5603);
    text-decoration: underline;
    text-decoration-color: rgba(189, 86, 3, 0.4);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.post-content a:hover {
    color: var(--bh-pink, #FED09E);
}

.post-content ul,
.post-content ol {
    margin: 1.25rem 0;
    padding-left: 1.25rem;
}

.post-content li {
    margin-bottom: 0.4rem;
}

.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(79, 37, 6, 0.35);
    border-left: 3px solid var(--bh-brown-light, #bd5603);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--bh-pink, #FED09E);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.25rem 0;
}

/* ========================================
   SIDEBAR
   ======================================== */

.post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-box {
    background: rgba(79, 37, 6, 0.5);
    border: 1px solid rgba(254, 208, 158, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-3);
}

.sidebar-box--categories {
    border-left: 3px solid var(--bh-brown-light, #bd5603);
}

.sidebar-box--tags {
    border-left: 3px solid var(--bh-pink, #FED09E);
}

.sidebar-box__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(254, 208, 158, 0.7);
    margin: 0 0 var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(254, 208, 158, 0.1);
}

.sidebar-box__title svg {
    opacity: 0.7;
}

.sidebar-box__items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-badge:hover {
    transform: translateY(-1px);
}

.sidebar-badge--category {
    background: linear-gradient(135deg, rgba(189, 86, 3, 0.25), rgba(189, 86, 3, 0.1));
    border: 1px solid rgba(189, 86, 3, 0.4);
    color: var(--bh-cream, #fffef8);
}

.sidebar-badge--category:hover {
    background: linear-gradient(135deg, rgba(189, 86, 3, 0.4), rgba(189, 86, 3, 0.25));
    border-color: rgba(189, 86, 3, 0.7);
}

.sidebar-badge--tag {
    background: rgba(254, 208, 158, 0.08);
    border: 1px solid rgba(254, 208, 158, 0.25);
    color: var(--bh-pink, #FED09E);
}

.sidebar-badge--tag:hover {
    background: rgba(254, 208, 158, 0.15);
    border-color: rgba(254, 208, 158, 0.4);
}

/* ========================================
   POST FOOTER
   ======================================== */

.post-footer {
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(254, 208, 158, 0.15);
}

.post-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.8rem;
    color: rgba(254, 208, 158, 0.6);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(79, 37, 6, 0.5);
    border: 1px solid rgba(254, 208, 158, 0.15);
    color: var(--bh-pink, #FED09E);
    text-decoration: none;
    transition: all 0.25s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    background: var(--bh-brown-light);
    color: var(--bh-cream);
}

/* ========================================
   POST NAVIGATION
   ======================================== */

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-3);
    background: rgba(79, 37, 6, 0.35);
    border: 1px solid rgba(254, 208, 158, 0.15);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.25s ease;
}

.post-nav-link:hover {
    background: rgba(79, 37, 6, 0.5);
    border-color: rgba(189, 86, 3, 0.4);
}

.post-nav-link--prev { text-align: left; }
.post-nav-link--next { text-align: right; }

.post-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(254, 208, 158, 0.6);
}

.post-nav-title {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bh-cream, #fffef8);
    line-height: 1.35;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
    .post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }

    .sidebar-box {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .single-post {
        padding-top: 80px; /* Smaller header on mobile */
    }
}

@media (max-width: 600px) {
    .post-layout {
        padding: var(--space-3) var(--space-3) var(--space-6);
    }

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

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

    .post-nav-link--next {
        text-align: left;
    }
}
