/* ===================== */
/* Blog – Listing Page   */
/* ===================== */

.blog-hero {
    background: var(--background);
    color: var(--foreground);
    padding: 5rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.blog-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-hero h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .blog-hero h1 {
        font-size: 3.25rem;
    }
}

/* Blog grid */
.blog-section {
    padding: 3rem 0 5rem;
    background: var(--muted);
    min-height: 60vh;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Blog card – list style */
.blog-card {
    background: var(--card);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: row;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

.blog-card-image {
    width: 220px;
    min-height: 100%;
    object-fit: cover;
    background: var(--border);
    flex-shrink: 0;
}

.blog-card-image-placeholder {
    width: 220px;
    min-height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 800;
    opacity: 0.85;
    flex-shrink: 0;
}

.blog-card-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.blog-card-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--muted-foreground);
}

/* Mobile: empilha verticalmente */
@media (max-width: 639px) {
    .blog-card {
        flex-direction: column;
    }

    .blog-card-image,
    .blog-card-image-placeholder {
        width: 100%;
        height: 180px;
        min-height: 180px;
    }

    .blog-card-body {
        padding: 1.25rem;
    }

    .blog-card-title {
        font-size: 1.05rem;
    }
}

/* Loading spinner */
.blog-loader {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.blog-loader .spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.blog-empty {
    text-align: center;
    padding: 4rem 0;
    color: var(--muted-foreground);
    font-size: 1.1rem;
}

/* ===================== */
/* Blog – Post Page      */
/* ===================== */

.post-hero {
    background: var(--background);
    padding: 4rem 0 2rem;
    border-bottom: 1px solid var(--border);
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.post-back:hover {
    opacity: 0.7;
}

.post-back .icon {
    width: 1rem;
    height: 1rem;
}

.post-category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.post-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--foreground);
    margin-bottom: 1.25rem;
    max-width: 800px;
}

@media (min-width: 768px) {
    .post-hero h1 {
        font-size: 2.75rem;
    }
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.post-meta .icon {
    width: 1rem;
    height: 1rem;
}

.post-cover {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 1rem;
    margin-top: 2rem;
}

/* Post content body */
.post-content-section {
    padding: 3rem 0 5rem;
    background: var(--background);
}

.post-body {
    max-width: 780px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--foreground);
}

.post-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--foreground);
}

.post-body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--foreground);
}

.post-body p {
    margin-bottom: 1.25rem;
    color: var(--foreground);
}

.post-body img {
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.post-body blockquote {
    border-left: 3px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--muted);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--muted-foreground);
    font-style: italic;
}

.post-body ul, .post-body ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

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

.post-body a {
    color: var(--primary);
    text-decoration: underline;
}

.post-body code {
    background: var(--muted);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.post-body pre {
    background: var(--foreground);
    color: var(--background);
    padding: 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Post loading placeholder */
.post-skeleton {
    max-width: 780px;
    margin: 0 auto;
}

.skeleton-line {
    height: 1rem;
    background: var(--border);
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line.w-full { width: 100%; }
.skeleton-line.w-3\/4 { width: 75%; }
.skeleton-line.w-1\/2 { width: 50%; }
.skeleton-line.w-2\/3 { width: 66%; }
.skeleton-line.h-lg { height: 1.6rem; margin-bottom: 1rem; }

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
