/* ════════════════════════════════════════════════════════════════
   POST INDIVIDUAL — hero, contenido, comentarios, descargas
   ════════════════════════════════════════════════════════════════ */

.post-page { max-width: 1280px; margin: 0 auto; padding: 7rem 3rem 0; }

/* ─── POST HERO ─── */
.post-hero {
    text-align: center; margin-bottom: 3rem;
    position: relative; padding: 2rem 0;
}
.post-hero .post-cat-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem 1rem; border-radius: 6px;
    font-size: .68rem; font-weight: 700; letter-spacing: .15em;
    text-transform: uppercase; margin-bottom: 1.5rem;
    background: rgba(0,255,224,.06); border: 1px solid rgba(0,255,224,.25);
    color: var(--neon); text-decoration: none;
}
.post-hero h1 {
    font-family: 'Orbitron', monospace; font-size: clamp(1.8rem, 4.5vw, 3.4rem);
    font-weight: 900; line-height: 1.15; letter-spacing: -.01em;
    margin-bottom: 1.5rem; max-width: 900px; margin-inline: auto;
}
.post-hero-meta {
    display: flex; align-items: center; justify-content: center;
    gap: 1.5rem; flex-wrap: wrap; color: var(--muted); font-size: .87rem;
}
.post-hero-meta > * { display: inline-flex; align-items: center; gap: .4rem; }
.post-hero-author {
    display: flex; align-items: center; gap: .55rem;
}
.post-hero-author .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--neon2), var(--neon3));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .68rem; font-weight: 700; color: #fff;
}
.post-hero-author .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.post-hero-stats {
    display: inline-flex; gap: 1rem; padding: .6rem 1.4rem;
    background: var(--card); border: 1px solid var(--border); border-radius: 999px;
    font-size: .82rem;
}
.post-hero-stats span { display: inline-flex; align-items: center; gap: .35rem; }
.post-hero-stats svg { width: 14px; height: 14px; }

/* ─── COVER ─── */
.post-cover {
    border-radius: 20px; overflow: hidden; margin-bottom: 3rem;
    border: 1px solid var(--border); aspect-ratio: 16/9;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ─── POST LAYOUT (con share rail) ─── */
.post-layout {
    display: grid; grid-template-columns: 60px 1fr 320px; gap: 2.5rem;
    align-items: flex-start;
}
@media (max-width: 1100px) {
    .post-layout { grid-template-columns: 1fr; }
}

/* Share rail (sticky lateral en desktop) */
.share-rail {
    position: sticky; top: 100px;
    display: flex; flex-direction: column; gap: .6rem; align-items: center;
}
.share-rail-label {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-size: .7rem; color: var(--muted); letter-spacing: .2em; text-transform: uppercase;
    margin-bottom: 1rem;
}
.share-btn {
    width: 42px; height: 42px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--card);
    color: var(--muted); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s; text-decoration: none;
}
.share-btn:hover { border-color: var(--neon); color: var(--neon); transform: translateY(-2px); }
.share-btn svg { width: 16px; height: 16px; }
@media (max-width: 1100px) {
    .share-rail { position: static; flex-direction: row; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
    .share-rail-label { display: none; }
}

/* ─── CONTENIDO ─── */
.post-content {
    color: var(--text); font-size: 1.05rem; line-height: 1.85;
    max-width: 760px; margin: 0 auto;
}
.post-content > * + * { margin-top: 1.4rem; }
.post-content h2 {
    font-family: 'Orbitron', monospace; font-size: 1.7rem;
    font-weight: 900; margin-top: 3rem; line-height: 1.3; letter-spacing: -.005em;
}
.post-content h3 {
    font-family: 'Orbitron', monospace; font-size: 1.3rem;
    font-weight: 700; margin-top: 2.4rem; line-height: 1.3;
}
.post-content h4 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-top: 2rem; }
.post-content p { color: var(--text); }
.post-content a {
    color: var(--neon); text-decoration: underline;
    text-underline-offset: 4px; text-decoration-color: rgba(0,255,224,.3);
    transition: all .2s;
}
.post-content a:hover { color: var(--neon2); text-decoration-color: var(--neon2); }
.post-content blockquote {
    border-left: 3px solid var(--neon); padding-left: 1.4rem;
    color: var(--muted); font-style: italic; font-size: 1.1rem;
    margin: 2rem 0;
}
.post-content code {
    background: var(--bg4); padding: .2rem .5rem; border-radius: 4px;
    font-size: .9rem; color: var(--neon); font-family: 'Courier New', monospace;
}
.post-content pre {
    background: var(--bg2); padding: 1.5rem; border-radius: 12px;
    border: 1px solid var(--border); overflow-x: auto;
    font-family: 'Courier New', monospace; font-size: .9rem;
}
.post-content pre code { background: none; padding: 0; color: var(--text); }
.post-content ul, .post-content ol { padding-left: 1.5rem; }
.post-content li { margin-bottom: .6rem; }
.post-content img {
    border-radius: 12px; margin: 1.5rem 0;
    border: 1px solid var(--border);
}
.post-content table {
    width: 100%; border-collapse: collapse; margin: 1.5rem 0;
    border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.post-content th, .post-content td {
    padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border);
}
.post-content th { background: var(--bg3); color: var(--neon); font-size: .85rem; }
.post-content hr {
    border: none; height: 1px; background: var(--border); margin: 3rem 0;
}

/* ─── TAGS POST ─── */
.post-tags {
    display: flex; flex-wrap: wrap; gap: .5rem;
    margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border);
}
.post-tags-label {
    font-size: .72rem; color: var(--muted); letter-spacing: .15em;
    text-transform: uppercase; align-self: center; margin-right: .5rem;
}

/* ─── VOTE BAR ─── */
.vote-bar {
    display: flex; gap: 1rem; align-items: center; justify-content: center;
    margin: 4rem 0; padding: 2rem;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 16px;
}
.vote-bar-prompt {
    font-family: 'Orbitron', monospace; font-size: .95rem; font-weight: 700;
    margin-right: 1rem;
}
.vote-btn {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .8rem 1.6rem; border-radius: 12px;
    border: 1px solid var(--border); background: var(--card);
    color: var(--text); font-family: 'Space Grotesk', sans-serif;
    font-size: .9rem; font-weight: 600; cursor: pointer;
    transition: all .2s; outline: none;
}
.vote-btn svg { width: 18px; height: 18px; transition: transform .2s; }
.vote-btn:hover { transform: translateY(-2px); }
.vote-btn.like:hover, .vote-btn.like.active {
    border-color: rgba(0,255,224,.3); background: rgba(0,255,224,.08); color: var(--neon);
}
.vote-btn.like.active svg { transform: scale(1.15); }
.vote-btn.dislike:hover, .vote-btn.dislike.active {
    border-color: rgba(255,60,172,.3); background: rgba(255,60,172,.08); color: var(--neon3);
}
.vote-btn.dislike.active svg { transform: scale(1.15); }
.vote-count {
    font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 900;
}

/* ─── DOWNLOADS ─── */
.downloads-section {
    margin: 4rem 0; padding: 2.5rem;
    background: var(--bg2); border: 1px solid var(--border); border-radius: 20px;
}
.downloads-section h3 {
    font-family: 'Orbitron', monospace; font-size: 1.3rem; font-weight: 700;
    margin-bottom: 1.5rem; letter-spacing: .03em;
    display: flex; align-items: center; gap: .7rem;
}
.downloads-section h3 svg { color: var(--neon); width: 22px; height: 22px; }
.downloads-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.download-card {
    border-radius: 14px; border: 1px solid var(--border);
    background: var(--bg3); padding: 1.4rem;
    transition: all .25s; position: relative;
}
.download-card:hover { border-color: rgba(0,255,224,.2); transform: translateY(-2px); }
.download-card-top { display: flex; gap: .9rem; margin-bottom: 1rem; }
.download-icon {
    width: 44px; height: 44px; border-radius: 11px;
    background: var(--bg4); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0; color: var(--neon);
    font-family: 'Orbitron', monospace; font-weight: 900; text-transform: uppercase;
}
.download-info { flex: 1; min-width: 0; }
.download-name {
    font-size: .9rem; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: .25rem;
}
.download-meta { font-size: .76rem; color: var(--muted); }
.download-card .btn-main {
    width: 100%; justify-content: center; padding: .65rem; font-size: .82rem;
    box-shadow: none;
}

/* ─── AUTHOR BIO ─── */
.author-bio {
    display: flex; gap: 1.4rem; align-items: center;
    margin: 4rem 0; padding: 2rem;
    background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
}
.author-bio .avatar {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--neon2), var(--neon3));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; color: #fff;
}
.author-bio .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.author-bio h4 { font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.author-bio p { font-size: .87rem; color: var(--muted); line-height: 1.7; }

/* ─── RELATED POSTS ─── */
.related-posts {
    margin: 4rem 0;
}
.related-posts h3 {
    font-family: 'Orbitron', monospace; font-size: 1.3rem; font-weight: 900;
    margin-bottom: 1.5rem; letter-spacing: -.005em;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }

/* ════════════════════════════════════════════════════════════════
   COMENTARIOS ANIDADOS
   ════════════════════════════════════════════════════════════════ */
.comments-section {
    margin: 4rem 0; padding-top: 3rem; border-top: 1px solid var(--border);
}
.comments-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.comments-header h3 {
    font-family: 'Orbitron', monospace; font-size: 1.4rem; font-weight: 900;
    display: inline-flex; align-items: center; gap: .8rem;
}
.comments-count {
    font-size: .9rem; color: var(--neon); padding: .25rem .8rem;
    border-radius: 6px; background: rgba(0,255,224,.06); border: 1px solid rgba(0,255,224,.2);
    font-family: 'Orbitron', monospace; font-weight: 700;
}

/* New comment form */
.comment-form-box {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.6rem; margin-bottom: 2.5rem;
}
.comment-form-prompt {
    text-align: center; padding: 2rem;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 16px; margin-bottom: 2.5rem;
}
.comment-form-prompt p { color: var(--muted); margin-bottom: 1rem; font-size: .9rem; }

/* Threads */
.comments-thread { display: flex; flex-direction: column; gap: 1.2rem; }
.comment {
    padding: 1.3rem 1.4rem;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 14px;
    position: relative;
}
.comment.deleted { opacity: .5; font-style: italic; }
.comment-head {
    display: flex; gap: .8rem; align-items: center;
    margin-bottom: .9rem;
}
.comment-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--neon2), var(--neon3));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; color: #fff;
}
.comment-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.comment-meta { flex: 1; min-width: 0; }
.comment-author { font-size: .87rem; font-weight: 600; color: var(--text); }
.comment-time { font-size: .75rem; color: var(--muted); }
.comment-edited { font-size: .7rem; color: var(--muted); font-style: italic; margin-left: .4rem; }
.comment-content {
    font-size: .92rem; line-height: 1.75; color: var(--text);
    white-space: pre-wrap; word-break: break-word;
}
.comment-actions {
    display: flex; gap: 1rem; margin-top: .9rem;
    font-size: .78rem;
}
.comment-actions button, .comment-actions a {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-family: inherit; font-size: .78rem; padding: 0;
    transition: color .2s;
}
.comment-actions button:hover, .comment-actions a:hover { color: var(--neon); }
.comment-actions .delete:hover { color: var(--neon3); }

/* Reply box */
.reply-box, .edit-box { margin-top: 1rem; display: none; }
.reply-box.open, .edit-box.open { display: block; }
.reply-box textarea, .edit-box textarea {
    width: 100%; padding: .8rem 1rem;
    background: var(--bg4); border: 1px solid var(--border); border-radius: 10px;
    color: var(--text); font-family: 'Space Grotesk', sans-serif; font-size: .9rem;
    min-height: 80px; resize: vertical; outline: none;
}
.reply-box textarea:focus, .edit-box textarea:focus { border-color: var(--neon2); }
.reply-box-actions, .edit-box-actions {
    display: flex; gap: .5rem; margin-top: .6rem;
}
.btn-sm {
    padding: .5rem 1rem; border-radius: 8px; font-size: .78rem;
    border: 1px solid var(--border); background: var(--card);
    color: var(--text); cursor: pointer; font-family: inherit;
    transition: all .2s;
}
.btn-sm.primary {
    background: linear-gradient(135deg, var(--neon), var(--neon2));
    color: #03040a; border-color: transparent; font-weight: 700;
}
.btn-sm:hover { transform: translateY(-1px); }

/* Anidación */
.comment-replies {
    margin-top: 1rem; padding-left: 2rem;
    border-left: 2px solid rgba(0,255,224,.15);
    display: flex; flex-direction: column; gap: 1rem;
}
.comment-replies .comment-replies {
    border-left-color: rgba(91,91,255,.15);
}
.comment-replies .comment-replies .comment-replies {
    border-left-color: rgba(255,60,172,.15);
}
/* niveles >3 quedan al mismo nivel */
.comment-replies .comment-replies .comment-replies .comment-replies {
    padding-left: 0; border-left: none;
}

@media (max-width: 700px) {
    .comment-replies { padding-left: 1rem; }
    .post-page { padding: 6rem 1.2rem 0; }
    .vote-bar { flex-wrap: wrap; }
    .author-bio { flex-direction: column; text-align: center; }
}
