/* Blog Styles - GenPKM */

/* ===== Blog Header ===== */
.blog-header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    margin-bottom: 40px;
}

.blog-header h1 {
    color: #00ffff;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.blog-header .lead {
    color: #adb5bd;
    font-size: 1.25rem;
}

/* ===== Blog Grid ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-card {
    background: #1e2233;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.3);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-card-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: #00ffff;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 15px;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card-excerpt {
    color: #adb5bd;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.blog-card-link {
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.blog-card-link:hover {
    color: #fff;
    transform: translateX(5px);
}

/* ===== Pagination ===== */
.blog-pagination {
    margin: 40px 0;
}

.blog-pagination .pagination {
    gap: 10px;
}

.blog-pagination .page-item .page-link {
    background: #1e2233;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #adb5bd;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.blog-pagination .page-item.active .page-link {
    background: #00ffff;
    color: #0f111a;
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.blog-pagination .page-item:not(.active) .page-link:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    color: #00ffff;
}

/* ===== Sidebar ===== */
.blog-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: #1e2233;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-widget-title {
    color: #00ffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-search-form .input-group .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px 0 0 8px;
}

.blog-search-form .input-group .btn {
    border-radius: 0 8px 8px 0;
}

.recent-posts-list,
.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts-list li,
.popular-posts-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-posts-list li:last-child,
.popular-posts-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-posts-list a,
.popular-posts-list a {
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.recent-posts-list a:hover,
.popular-posts-list a:hover {
    color: #00ffff;
}

.post-date,
.post-views {
    color: #6c757d;
    font-size: 0.875rem;
    display: block;
}

.newsletter-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.newsletter-widget .sidebar-widget-title {
    color: #fff;
}

.newsletter-widget p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}

/* ===== Empty State ===== */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.blog-empty i {
    opacity: 0.3;
    margin-bottom: 20px;
}

/* ===== Individual Blog Post ===== */
.blog-post-single {
    padding: 40px 0;
}

.post-header {
    margin-bottom: 40px;
}

.post-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 25px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #adb5bd;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.2);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i {
    color: #00ffff;
}

.post-featured-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    color: #e9ecef;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 50px;
}

.post-content h2 {
    color: #00ffff;
    font-size: 2rem;
    font-weight: 600;
    margin: 40px 0 20px 0;
}

.post-content h3 {
    color: #00ffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content a {
    color: #00ffff;
    text-decoration: underline;
}

.post-content a:hover {
    color: #fff;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

.post-content code {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre {
    background: #1e2233;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 30px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* ===== FAQ Section ===== */
.post-faq-section {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px;
    margin: 50px 0;
}

.post-faq-section h2 {
    color: #00ffff;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.faq-item {
    background: rgba(30, 34, 51, 0.5);
    border-radius: 8px;
    padding: 20px;
}

.faq-question {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-question i {
    color: #00ffff;
}

.faq-answer {
    color: #e9ecef;
    line-height: 1.7;
}

/* ===== Share Buttons ===== */
.post-share {
    background: #1e2233;
    border-radius: 12px;
    padding: 30px;
    margin: 50px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-share h3 {
    color: #00ffff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.share-btn {
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.facebook {
    background: #4267B2;
}

.share-btn.reddit {
    background: #FF4500;
}

.share-btn.linkedin {
    background: #0077B5;
}

/* ===== Related Posts ===== */
.related-posts {
    margin: 60px 0;
}

.related-posts h2 {
    color: #00ffff;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.related-post-card {
    background: #1e2233;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 255, 255, 0.2);
}

.related-post-image {
    display: block;
    height: 180px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 20px;
}

.related-post-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.related-post-content h3 a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-content h3 a:hover {
    color: #00ffff;
}

.related-post-content p {
    color: #adb5bd;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.related-post-link {
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.related-post-link:hover {
    transform: translateX(5px);
}

.back-to-blog {
    text-align: center;
    margin-top: 50px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

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

    .post-content {
        font-size: 1rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 10px;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-faq-section {
        padding: 25px 20px;
    }
}

@media (max-width: 992px) {
    .blog-sidebar {
        margin-top: 40px;
        position: static;
    }
}

/* ===== Comments Section ===== */
.comments-section {
    margin: 60px 0;
    padding: 40px;
    background: #1e2233;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.2);
}

.comments-header h2 {
    color: #00ffff;
    font-size: 2rem;
    margin: 0;
}

.comments-count {
    color: #adb5bd;
    font-size: 1.125rem;
}

.comments-sort {
    display: flex;
    gap: 10px;
    align-items: center;
}

.comments-sort label {
    color: #adb5bd;
    font-size: 0.875rem;
}

.comments-sort select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* Comment Form */
.comment-form {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
}

.comment-form h3 {
    color: #00ffff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.comment-form-group {
    margin-bottom: 15px;
}

.comment-form-group label {
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.comment-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.comment-textarea:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.comment-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.character-count {
    color: #adb5bd;
    font-size: 0.875rem;
}

.character-count.warning {
    color: #ffc107;
}

.character-count.error {
    color: #dc3545;
}

.comment-form-actions {
    display: flex;
    gap: 10px;
}

.btn-comment-submit {
    background: #00ffff;
    color: #0f111a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-comment-submit:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
}

.btn-comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-comment-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-comment-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.login-prompt {
    text-align: center;
    padding: 30px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 40px;
}

.login-prompt p {
    color: #adb5bd;
    margin-bottom: 15px;
}

.login-prompt .btn {
    background: #00ffff;
    color: #0f111a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.login-prompt .btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

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

.comment-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 255, 0.2);
}

.comment-item.pending {
    opacity: 0.7;
    background: rgba(255, 193, 7, 0.05);
    border-color: rgba(255, 193, 7, 0.3);
}

.comment-item.hidden {
    opacity: 0.5;
    background: rgba(220, 53, 69, 0.05);
    border-color: rgba(220, 53, 69, 0.3);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.3);
    object-fit: cover;
}

.comment-author-info {
    flex: 1;
}

.comment-author-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-badge {
    background: #00ffff;
    color: #0f111a;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.comment-meta {
    color: #6c757d;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-edited {
    font-style: italic;
}

.comment-status-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.comment-status-badge.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.comment-status-badge.hidden {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.comment-body {
    color: #e9ecef;
    line-height: 1.7;
    margin-bottom: 15px;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #adb5bd;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.comment-action-btn:hover {
    color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
}

.comment-action-btn.liked {
    color: #00ffff;
}

.comment-action-btn i {
    font-size: 0.875rem;
}

.like-count {
    font-weight: 600;
}

/* Nested Replies */
.comment-replies {
    margin-top: 20px;
    margin-left: 40px;
    padding-left: 20px;
    border-left: 2px solid rgba(0, 255, 255, 0.2);
}

.comment-replies .comment-item {
    background: rgba(0, 255, 255, 0.02);
}

.comment-replies .comment-avatar {
    width: 35px;
    height: 35px;
}

.reply-form {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.reply-form .comment-textarea {
    min-height: 80px;
}

.edit-form {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Empty State */
.comments-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.comments-empty i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 20px;
}

.comments-empty p {
    font-size: 1.125rem;
    margin: 0;
}

/* Loading State */
.comments-loading {
    text-align: center;
    padding: 40px;
    color: #adb5bd;
}

.comments-loading i {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Pagination */
.comments-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
}

.comments-pagination button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #adb5bd;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comments-pagination button:hover:not(:disabled) {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    color: #00ffff;
}

.comments-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.comments-pagination button.active {
    background: #00ffff;
    color: #0f111a;
    border-color: #00ffff;
}

/* Report Modal (if needed) */
.report-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.report-modal.active {
    display: flex;
}

.report-modal-content {
    background: #1e2233;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.report-modal h3 {
    color: #00ffff;
    margin-bottom: 20px;
}

.report-modal .form-group {
    margin-bottom: 15px;
}

.report-modal label {
    color: #fff;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.report-modal select,
.report-modal textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px;
    border-radius: 6px;
}

.report-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comments-section {
        padding: 25px 20px;
    }

    .comments-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .comment-replies {
        margin-left: 20px;
        padding-left: 15px;
    }

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

    .comment-form-actions {
        width: 100%;
    }

    .btn-comment-submit,
    .btn-comment-cancel {
        flex: 1;
    }
}
