/* Layout base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --post-surface: var(--surface-2, #020617);
    --post-border: rgba(63, 80, 116, 0.45);
    --post-accent: var(--brand-accent, #38bdf8);
    --post-text: #e5e7eb;
    --post-muted: #9ca3af;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(820px 520px at 12% -8%, rgba(46, 139, 255, 0.12), transparent 55%),
        linear-gradient(180deg, #0a0f1a 0%, #050816 65%);
    color: #f1f5f9;
    line-height: 1.6;
}

a {
    color: var(--post-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.main-content {
    width: 100%;
    max-width: 980px;
}

.site-header {
    background: #020617;
    border-bottom: 1px solid #1f2937;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo a {
    font-size: 1.3rem;
    font-weight: 700;
    color: #38bdf8;
}

.main-nav a {
    margin-left: 16px;
    font-size: 0.95rem;
    color: #e5e7eb;
}

.main-nav a.active {
    font-weight: 600;
    border-bottom: 2px solid #38bdf8;
    padding-bottom: 4px;
}

/* Conteudo principal */
.post {
    background: var(--post-surface);
    border-radius: 16px;
    padding: 28px 22px 36px;
    box-shadow: 0 18px 40px rgba(5, 8, 22, 0.7);
    border: 1px solid var(--post-border);
    position: relative;
    overflow: hidden;
}

.post::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(900px 900px at 8% 12%, rgba(56, 189, 248, 0.08), transparent 45%);
    pointer-events: none;
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--post-muted);
    margin-bottom: 10px;
    padding: 6px 10px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid var(--post-border);
    border-radius: 999px;
}

.post-title {
    font-size: clamp(1.9rem, 3vw + 1rem, 2.4rem);
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--post-text);
}

.post-subtitle {
    font-size: 1.05rem;
    color: var(--post-muted);
    margin-bottom: 14px;
}

.post-meta {
    font-size: 0.9rem;
    color: #8892a0;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Imagem de destaque */
.post-hero {
    margin-bottom: 22px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--post-border);
    background: #0b1323;
}

.post-hero img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-hero figcaption {
    font-size: 0.85rem;
    color: var(--post-muted);
    padding: 10px 12px;
    background: #0b1323;
}

.post-inline-hero {
    margin: 18px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--post-border);
    background: #0b1323;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.post-inline-hero img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.post-inline-hero figcaption {
    font-size: 0.85rem;
    color: var(--post-muted);
    padding: 8px 10px;
}

/* Acoes: curtir + compartilhar */
.post-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 12px 12px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 11, 26, 0.9));
    border: 1px solid var(--post-border);
}

.like-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

#like-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--post-border);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    background: #0f172a;
    color: var(--post-text);
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#like-button:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.15);
}

#like-button.liked {
    background: linear-gradient(120deg, #34d399, #22c55e);
    color: #022c22;
    font-weight: 600;
    border-color: rgba(52, 211, 153, 0.8);
}

#like-count {
    font-size: 0.85rem;
    color: var(--post-muted);
}

.share-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--post-muted);
}

.share-btn {
    border: 1px solid var(--post-border);
    border-radius: 999px;
    padding: 6px 12px;
    background: #0f172a;
    color: var(--post-text);
    cursor: pointer;
    font-size: 0.85rem;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.share-btn:hover {
    background: #111a2f;
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.6);
}

.share-feedback {
    font-size: 0.9rem;
    color: #e5e7eb;
    background: #1c1f2b;
    border: 1px solid rgba(63, 80, 116, 0.6);
    padding: 10px 12px;
    border-radius: 8px;
    display: inline-block;
    min-height: 18px;
}

.share-feedback.toast-success { color: #d1fae5; background: #064e3b; border-color: #10b981; }
.share-feedback.toast-error { color: #fee2e2; background: #7f1d1d; border-color: #ef4444; }
.share-feedback.toast-info { color: #e0f2fe; background: #0b3b63; border-color: #38bdf8; }

/* Corpo do post */
.post-body {
    margin-top: 8px;
    margin-bottom: 26px;
}

.post-body h2 {
    font-size: 1.3rem;
    margin-top: 18px;
    margin-bottom: 10px;
    color: var(--post-text);
}

.post-body p {
    margin-bottom: 12px;
    color: #d1d5db;
}

.post-body ul {
    margin: 10px 0 12px 18px;
    padding-left: 4px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body strong {
    color: #fff;
}

/* Feedback "foi util?" */
.post-feedback {
    margin-top: 12px;
    margin-bottom: 26px;
    padding: 16px 14px 18px;
    border-radius: 12px;
    background: #0b1323;
    border: 1px solid var(--post-border);
}

.post-feedback h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.feedback-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.feedback-btn {
    border-radius: 999px;
    padding: 6px 14px;
    border: 1px solid var(--post-border);
    background: #0f172a;
    color: var(--post-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.feedback-btn:hover {
    background: #111a2f;
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.6);
}

.feedback-hint {
    font-size: 0.8rem;
    color: #7c8595;
}

/* Comentarios */
.post-comments h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.comments-list {
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: #d1d5db;
}

.no-comments {
    color: #7c8595;
    font-style: italic;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.comment-form label {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-form input,
.comment-form textarea {
    background: #0b1323;
    border: 1px solid var(--post-border);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--post-text);
    font-size: 0.9rem;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: #6b7280;
}

.comment-submit {
    align-self: flex-start;
    margin-top: 4px;
    border-radius: 999px;
    padding: 8px 18px;
    border: none;
    background: linear-gradient(120deg, #38bdf8, #2e8bff);
    color: #0f172a;
    font-size: 0.92rem;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, filter 0.2s ease;
}

.comment-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.comment-hint {
    font-size: 0.8rem;
    color: #7c8595;
}

.comment-item {
    padding: 10px 12px;
    border: 1px solid var(--post-border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.4);
    margin-bottom: 8px;
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--post-muted);
}

.comment-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Banner de destaque no blog */
.announce-banner {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(255, 196, 48, 0.35);
    border-radius: 1rem;
    background: linear-gradient(120deg, rgba(255, 196, 48, 0.18), rgba(12, 16, 28, 0.92));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 196, 48, 0.35);
}

.announce-banner h3 {
    color: #e8f0ff;
}

.announce-banner p {
    color: #cbd6f5;
}

.announce-banner .btn {
    min-width: 150px;
    align-self: center;
}

.announce-banner .badge {
    letter-spacing: 0.05em;
}

.announce-banner.iss-banner {
    /* mantem o mesmo visual dourado do index */
}

@media (max-width: 576px) {
    .announce-banner {
        flex-direction: column;
        text-align: left;
    }
}

/* Lista de posts */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.post-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--post-border);
    border-radius: 14px;
    background: radial-gradient(600px 600px at 20% 20%, rgba(56, 189, 248, 0.08), transparent 55%), #0b1323;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-height: 100%;
}

.post-card-media {
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--post-border);
    background: #0f172a;
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.post-card-body p {
    color: var(--post-muted);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-body a {
    color: var(--post-text);
}

.post-card-body a:hover {
    color: #8bd5ff;
}

.post-card .post-date {
    color: #8bd5ff;
    font-weight: 600;
}

.likes-pill {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--post-border);
    background: #0f172a;
    color: var(--post-muted);
}

/* Rodape */
.site-footer {
    border-top: 1px solid #1f2937;
    background: #020617;
    margin-top: 24px;
}

.footer-inner {
    padding: 16px 0;
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Responsividade */
@media (max-width: 640px) {
    .post {
        padding: 22px 16px 28px;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-actions {
        align-items: flex-start;
    }

    .share-area {
        width: 100%;
    }

    .main-nav a {
        margin-left: 0;
        margin-right: 12px;
    }
}
