/* public\inc\blog-view.css */

* {
    max-width: 100%;
    word-wrap: break-word;
}

.content-wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.post {
    flex: 1;
    min-width: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.post-header {
    padding: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--gray-800);
}

.author-role {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
    line-height: 1.2;
    color: var(--gray-800);
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.post-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.post-content {
    padding: 1rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-800);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.post-content h1 {
    font-size: 2rem;
}

.post-content h2 {
    font-size: 1.75rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content h4 {
    font-size: 1.25rem;
}

.post-content h5 {
    font-size: 1.125rem;
}

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

.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin: 0.5rem 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    margin: 1.5rem 0;
}

.post-content iframe {
    max-width: 100%;
    border-radius: var(--border-radius-sm);
    margin: 1.5rem 0;
}

.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary);
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    font-style: italic;
}

.post-content pre {
    background: var(--gray-800);
    color: var(--gray-100);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content code {
    background: var(--gray-200);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

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

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.post-content th,
.post-content td {
    border: 1px solid var(--gray-300);
    padding: 0.75rem;
    text-align: left;
}

.post-content th {
    background: var(--gray-100);
    font-weight: 600;
}

.post-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    padding: 0.375rem 1rem;
    background: var(--white);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

.comments-section {
    padding: 2rem;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.email-input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.email-input:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-container {
    margin-top: 1rem;
    text-align: right;
}

.comment-submit,
.reply-submit {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-submit:hover,
.reply-submit:hover {
    background: var(--secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.comment-submit.submitting-state,
.reply-submit.submitting-state {
    opacity: 0.7;
    cursor: not-allowed;
}

.comments-list {
    margin-top: 2rem;
}

.comment {
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.comment.reply {
    margin-left: 3rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-meta {
    display: flex;
    flex-direction: column;
}

.comment-name {
    font-weight: 600;
    color: var(--gray-800);
}

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

.comment-reply {
    padding: 0.375rem 1rem;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.comment-reply:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.comment p {
    margin-left: 56px;
    color: var(--gray-700);
    word-wrap: break-word;
}

.replies {
    margin-top: 1rem;
}

.reply-form {
    margin-top: 1rem;
    margin-left: 56px;
}

.reply-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

.reply-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    box-sizing: border-box;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.no-comments {
    text-align: center;
    padding: 3rem;
}

.no-comments-image {
    max-width: 200px;
    margin: 1rem auto;
}

.no-comments-text {
    color: var(--gray-600);
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

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

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

    .comments-section {
        padding: 1.5rem;
    }

    .comment.reply {
        margin-left: 1rem;
    }

    .comment p {
        margin-left: 0;
    }

    .reply-form {
        margin-left: 0;
    }
}

/* /////// */

/* Post Navigation */
.post-navigation {
    padding: 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.post-nav-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: 100%;
}

.post-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-nav-prev {
    text-align: left;
}

.post-nav-next {
    text-align: right;
}

.post-nav-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.post-nav-prev:hover {
    transform: translateX(-2px) translateY(-2px);
}

.post-nav-next:hover {
    transform: translateX(2px) translateY(-2px);
}

.post-nav-label {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.post-nav-next .post-nav-label {
    display: inline-block;
}

.post-nav-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-nav-prev .post-nav-title {
    padding-right: 1rem;
}

.post-nav-next .post-nav-title {
    padding-left: 1rem;
}

.post-nav-link:hover .post-nav-title {
    color: #2563eb;
}

.post-nav-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-nav-disabled:hover {
    transform: none;
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .post-nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-nav-link {
        padding: 0.875rem 1rem;
    }
    
    .post-nav-prev {
        text-align: left;
    }
    
    .post-nav-next {
        text-align: right;
    }
    
    .post-nav-prev:hover {
        transform: translateY(-2px);
    }
    
    .post-nav-next:hover {
        transform: translateY(-2px);
    }
}

/* ///////////// */

/* Random Posts Section */
.random-posts {
    padding: 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.random-posts-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-left: 2.25rem;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.random-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.random-post-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.random-post-card:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.random-post-icon {
    font-size: 1.25rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.random-post-title {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.random-post-arrow {
    font-size: 1rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.random-post-card:hover .random-post-arrow {
    transform: translateX(4px);
    color: #6b7280;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .random-posts-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .random-post-card {
        padding: 0.875rem 1rem;
    }
}
        