/* =====================================================
   CODING DROP — POST DETAILS PAGE STYLES
   ===================================================== */

/* ---- POST HERO ---- */
.post-hero {
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: var(--transition);
}

.breadcrumb a:hover { color: var(--accent-cyan); }
.breadcrumb i { font-size: 0.6rem; opacity: 0.5; }
.breadcrumb span { color: var(--text-secondary); }

.post-hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: flex-start;
}

.post-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(88, 230, 200, 0.1);
    border: 1px solid rgba(88, 230, 200, 0.2);
    color: var(--accent-cyan);
    margin-bottom: 16px;
}

.post-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.post-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 680px;
    margin-bottom: 24px;
}

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    color: #0a0d13;
    flex-shrink: 0;
}

.author-name {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.author-role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-meta-items {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-item i { font-size: 0.7rem; color: var(--accent-cyan); }

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-hero-icon {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.post-hero-icon-i {
    font-size: 3.5rem;
    position: relative;
    z-index: 1;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- POST LAYOUT ---- */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* ---- ARTICLE ---- */
.post-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    min-width: 0;
}

/* Article Typography */
.article-body { line-height: 1.85; }

.article-body .lead {
    font-size: 1.08rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
    padding-left: 20px;
    border-left: 3px solid var(--accent-cyan);
}

.article-body h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 36px 0 14px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-body h2::before {
    content: '#';
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    opacity: 0.6;
}

.article-body h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 10px;
}

.article-body p {
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 0.97rem;
}

.article-body strong { color: var(--text-primary); font-weight: 600; }
.article-body em { color: var(--accent-cyan); font-style: normal; font-weight: 500; }

.article-body ul, .article-body ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.article-body li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.97rem;
    position: relative;
}

.article-body ul li::marker { color: var(--accent-cyan); }

.article-body pre {
    background: rgba(12, 16, 24, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
    color: #e6edf3;
    position: relative;
}

/* Light mode code blocks stay dark */
[data-theme="light"] .article-body pre {
    background: rgba(20, 25, 40, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e6edf3;
}

.article-body code {
    font-family: var(--font-mono);
    font-size: 0.83rem;
    background: rgba(88, 230, 200, 0.08);
    border: 1px solid rgba(88, 230, 200, 0.15);
    border-radius: 5px;
    padding: 2px 7px;
    color: var(--accent-cyan);
}

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

/* Article Footer */
.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 28px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}

.article-footer-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.article-share button,
.article-share a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.article-share button:hover,
.article-share a:hover {
    border-color: var(--border-hover);
    color: var(--accent-cyan);
    background: rgba(88, 230, 200, 0.06);
}

/* ---- SIDEBAR ---- */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 88px;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.sidebar-card h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h3 i { color: var(--accent-cyan); font-size: 0.85rem; }

/* Author Card */
.author-card { text-align: center; }

.author-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: #0a0d13;
    margin: 0 auto 12px;
}

.author-card h3 { justify-content: center; font-size: 1rem; margin-bottom: 2px; }
.author-card-role { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 10px; }
.author-card-bio { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }

.author-card-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.author-card-links a {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: var(--transition);
}

.author-card-links a:hover {
    border-color: var(--border-hover);
    color: var(--accent-cyan);
}

/* ---- RATING WIDGET ---- */
.rating-card { }
.rating-prompt { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 14px; }

.stars-widget {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.star-btn {
    font-size: 1.6rem;
    color: var(--border);
    transition: color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    padding: 2px;
    background: none;
    border: none;
    line-height: 1;
}

.star-btn:hover,
.star-btn.hovered,
.star-btn.rated {
    color: #f5c518;
    transform: scale(1.15);
}

.star-btn.rated { animation: starPop 0.2s ease; }

@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1.15); }
}

.rating-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}

.rating-avg {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.rating-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Rating distribution bars */
.rating-bars { display: flex; flex-direction: column; gap: 5px; }

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rating-bar-row .bar-label { min-width: 30px; text-align: right; }

.rating-bar-track {
    flex: 1;
    height: 6px;
    background: var(--bg-glass);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.rating-bar-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rating-bar-row .bar-count { min-width: 16px; }

.user-rated-msg {
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--accent-green);
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    text-align: center;
}

.user-rated-msg i { margin-right: 6px; }

/* ---- RELATED LIST ---- */
.related-list { display: flex; flex-direction: column; gap: 12px; }

.related-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.related-item:hover {
    background: var(--bg-glass);
    border-color: var(--border);
}

.related-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.related-text h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    line-height: 1.3;
}

.related-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ---- COMMENTS SECTION ---- */
.comments-section {
    padding: 60px 0;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .comments-section {
    background: rgba(0, 0, 0, 0.02);
}

.comments-header {
    margin-bottom: 28px;
}

.comments-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.comments-header h2 i { color: var(--accent-cyan); }

.comment-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    background: rgba(88, 230, 200, 0.12);
    border: 1px solid rgba(88, 230, 200, 0.2);
    color: var(--accent-cyan);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 50px;
}

.comments-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Comment Form */
.comment-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
}

.comment-form-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.required { color: var(--accent-cyan); }
.optional { font-weight: 400; color: var(--text-muted); font-size: 0.72rem; }

.form-group input,
.form-group textarea {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--border-hover);
    background: rgba(88, 230, 200, 0.03);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.char-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: -10px;
}

.char-count.over { color: var(--accent-pink); }

.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-1);
    color: #0a0d13;
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: 50px;
    transition: var(--transition);
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(88, 230, 200, 0.3);
}

.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    animation: cardAppear 0.4s ease forwards;
    opacity: 0;
    transform: translateY(12px);
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    color: #0a0d13;
    flex-shrink: 0;
}

.comment-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.no-comments {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

.no-comments i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    opacity: 0.3;
}

.no-comments p { font-size: 0.9rem; }

/* ---- MORE ARTICLES ---- */
.more-articles-section {
    padding: 60px 0 80px;
}

.more-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Section Headers (shared) */
.section-header { text-align: center; margin-bottom: 40px; }
.section-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    display: block;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

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

    .post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .related-card { grid-column: 1 / -1; }

    .more-articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .post-hero-inner { grid-template-columns: 1fr; }
    .post-hero-icon { display: none; }

    .post-article { padding: 24px; }

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

    .comment-form-row { grid-template-columns: 1fr; }

    .more-articles-grid { grid-template-columns: 1fr; }

    .article-footer { flex-direction: column; align-items: flex-start; }

    .post-meta-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}
