/* ==========================================================================
   SINGLE POST STYLES
   ========================================================================== */

.site-wrapper {
    max-width: var(--max-block-width);
    background-color: var(--blog-background);
    width: 100%;
    margin: 0 auto;
}

.content-wrapper {
    max-width: var(--max-content-width);
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   POST HERO
   ========================================================================== */

.post-hero {
    width: 100%;
    max-width: var(--max-block-width);
    max-height: 600px;
    height: 600px;
    overflow: hidden;
    margin: 0 auto;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   POST TITLE
   ========================================================================== */

.post-title {
    padding: var(--space-lg) 0;
}

.post-title h1 {
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   POST LAYOUT
   ========================================================================== */

.post-layout {
    display: flex;
    flex-direction: row;
    padding-bottom: var(--space-sm);
    gap: var(--space-md);
}

/* ==========================================================================
   POST META (SIDEBAR)
   ========================================================================== */

.post-meta {
    flex: 1;
    max-width: 30%;
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-meta h4 {
    margin-bottom: var(--space-xs);
    color: var(--primary-blue);
}

.post-meta .meta-item {
    margin-bottom: var(--space-sm);
    padding: var(--space-xs);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.post-meta .meta-label {
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.post-meta .categories a,
.post-meta .tags a {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 4px 2px 0;
    background: var(--primary-blue);
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.post-meta .categories a:hover,
.post-meta .tags a:hover {
    background: var(--primary-green);
}

/* ==========================================================================
   POST CONTENT (MAIN CONTENT)
   ========================================================================== */

.post-content {
    flex: 2;
    max-width: 65%;
    line-height: 1.6;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.post-content>p:first-of-type {
    padding-top: 0;
    margin-top: 0;
    font-size: 1.1em;
    line-height: 1.5;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
}

.post-content h2 {
    font-size: var(--font-lg);
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: var(--space-xs);
}

.post-content h3 {
    font-size: var(--font-md);
    color: var(--primary-blue);
}

.post-content ul,
.post-content ol {
    margin: var(--space-sm) 0;
    padding-left: var(--space-md);
}

.post-content li {
    margin-bottom: var(--space-xs);
    font-family: var(--font-sans);
    font-size: var(--font-sm);
    color: var(--text-color);
    line-height: 1.6;
}

.post-content blockquote {
    margin: var(--space-md) 0;
    padding: var(--space-sm);
    border-left: 4px solid var(--primary-yellow);
    background: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: var(--space-sm) 0;
    border-radius: 4px;
}

.post-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: rgba(0, 0, 0, 0.1);
    padding: var(--space-sm);
    border-radius: 4px;
    overflow-x: auto;
    margin: var(--space-sm) 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* ==========================================================================
   MOBILE STYLES
   ========================================================================== */

@media (max-width: 768px) {
    .post-hero {
        height: auto;
        max-height: 400px;
    }

    .post-hero .hero-image img {
        height: 400px;
    }

    .post-title {
        padding: 48px;
    }

    .post-layout {
        flex-direction: column;
        padding: 0 48px 48px 48px;
        gap: var(--space-lg);
    }

    .post-meta {
        max-width: 100%;
        order: 2;
    }

    .post-content {
        max-width: 100%;
        order: 1;
    }
}

@media (max-width: 480px) {
    .post-title {
        padding: 24px;
    }

    .post-layout {
        padding: 0 24px 24px 24px;
    }

    .post-hero {
        max-height: 250px;
    }

    .post-hero .hero-image img {
        height: 250px;
    }
}