/* Blog Post Detail Styles */
.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.blog-post {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

/* Post Header */
.post-header {
    padding: 40px;
    border-bottom: 1px solid var(--gray-light);
}

.post-breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--gray-dark);
}

.post-breadcrumb a {
    color: var(--primary-orange);
    text-decoration: none;
}

.post-breadcrumb a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 10px;
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 25px 0;
    color: var(--text);
    font-weight: 700;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.post-meta-left {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.95rem;
    color: var(--gray-dark);
}

.post-author {
    font-weight: 600;
    color: var(--text);
}

.post-meta-right {
    font-size: 0.9rem;
    color: var(--gray-dark);
}

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

.post-featured-image {
    aspect-ratio: 4 / 3;        /* Maintain 4:3 aspect ratio */
    width: 100%;                /* Responsive width */
    overflow: hidden;
    background: #f8f9fa;        /* Optional: light background */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.post-featured-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;        /* Scale to fit without cropping */
    object-position: center;    /* Center horizontally and vertically */
    transition: transform 0.3s ease;
}
/* Post Content */
.post-content {
    padding: 40px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text);
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--primary-navy);
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 600;
}

.post-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: 0.5em;
}

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

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

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

.post-content ul,
.post-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.post-content li {
    margin-bottom: 0.5em;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-orange);
    padding: 1em 1.5em;
    margin: 2em 0;
    background: var(--background);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.post-content code {
    background: var(--background);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--primary-navy);
    color: var(--gray-light);
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

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

.post-content a {
    color: var(--primary-orange);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.post-content a:hover {
    border-bottom-color: var(--primary-orange);
}

.post-content strong {
    color: var(--primary-navy);
    font-weight: 600;
}

.post-content em {
    color: var(--gray-dark);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content table th,
.post-content table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.post-content table th {
    background: var(--background);
    font-weight: 600;
    color: var(--primary-navy);
}

.post-content table tr:last-child td {
    border-bottom: none;
}

.post-content table tr:hover {
    background: rgba(218, 106, 34, 0.05);
}

/* Post Footer Styles */
.post-footer {
    padding: 30px 40px;
    border-top: 1px solid var(--gray-light);
    background: var(--background);
}

.social-sharing {
    margin-bottom: 30px;
}

.social-sharing h4 {
    margin-bottom: 15px;
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}

.social-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    text-decoration: none;
}

.social-btn i {
    font-size: 1rem;
}

.social-btn.twitter {
    background: #1da1f2;
    color: white;
}

.social-btn.twitter:hover {
    background: #1a91da;
}

.social-btn.linkedin {
    background: #0077b5;
    color: white;
}

.social-btn.linkedin:hover {
    background: #006ba1;
}

.social-btn.facebook {
    background: #1877f2;
    color: white;
}

.social-btn.facebook:hover {
    background: #166fe5;
}

.social-btn.copy {
    background: var(--gray-light);
    color: var(--text);
}

.social-btn.copy:hover {
    background: #cbd5e1;
    color: var(--primary-navy);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post-engagement {
    display: flex;
    justify-content: center;
}

.like-button {
    background: white;
    border: 2px solid var(--gray-light);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--gray-dark);
    font-size: 1rem;
}

.like-button:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 106, 34, 0.2);
}

.like-button.liked {
    background: var(--primary-orange);
    color: white;
    border-color: var(--primary-orange);
}

.like-button.liked:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
}

.like-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-dark);
    font-size: 1rem;
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--gray-light);
    border-radius: 25px;
}

.like-display i {
    color: var(--primary-orange);
}

/* Related Posts */
.related-posts {
    margin: 40px 0;
    padding: 40px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--gray-light);
}

.related-posts h3 {
    margin-bottom: 25px;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: 10px;
}

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

.related-post-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-light);
}

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

.related-post-image {
    height: 140px;
    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 h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
}

.related-post-content h4 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-content h4 a:hover {
    color: var(--primary-orange);
}

.related-post-content p {
    margin: 0 0 12px 0;
    color: var(--gray-dark);
    font-size: 0.9rem;
    line-height: 1.5;
}

.related-post-date {
    font-size: 0.85rem;
    color: var(--gray-dark);
    font-weight: 500;
}

/* Comments Section */
.comments-section {
    background: white;
    padding: 40px;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--gray-light);
}

.comments-section h3 {
    margin-bottom: 30px;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: 10px;
}

.comment-form-wrapper {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--background);
    border-radius: 1rem;
    border: 1px solid var(--gray-light);
}

.comment-form-wrapper h4 {
    margin-bottom: 20px;
    color: var(--primary-navy);
    font-size: 1.2rem;
    font-weight: 600;
}

.comment-form {
    display: grid;
    gap: 20px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(218, 106, 34, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-comment-btn {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-self: start;
}

.submit-comment-btn:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 106, 34, 0.3);
}

.submit-comment-btn:active {
    transform: translateY(0);
}

.comments-list {
    margin-top: 30px;
}

.comment {
    padding: 25px;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 20px;
    background: var(--background);
    border-radius: 1rem;
    border: 1px solid var(--gray-light);
}

.comment:last-child {
    margin-bottom: 0;
}

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

.comment-author {
    color: var(--primary-navy);
    font-weight: 600;
    font-size: 1rem;
}

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

.comment-content {
    color: var(--text);
    line-height: 1.6;
    font-size: 1rem;
}

.comment-content p {
    margin-bottom: 1em;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.no-comments {
    text-align: center;
    color: var(--gray-dark);
    font-style: italic;
    padding: 60px 20px;
    background: var(--background);
    border-radius: 1rem;
    border: 1px solid var(--gray-light);
}

/* Loading states */
.comment-form.loading .submit-comment-btn {
    opacity: 0.7;
    cursor: not-allowed;
}

.comment-form.loading .submit-comment-btn::after {
    content: " Submitting...";
}

/* Success/Error messages */
.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.form-message.success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.form-message.error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border: 1px solid rgba(245, 101, 101, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-post-container {
        padding: 15px;
    }
    
    .post-header,
    .post-content,
    .comments-section,
    .related-posts {
        padding: 25px;
    }
    
    .post-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .post-meta-left {
        flex-direction: column;
        gap: 8px;
    }
    
    .social-buttons {
        justify-content: center;
        gap: 8px;
    }
    
    .social-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .comment-form-wrapper {
        padding: 20px;
    }
    
    .comment {
        padding: 20px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.6rem;
    }
    
    .post-content h3 {
        font-size: 1.4rem;
    }
    
    .post-content h4 {
        font-size: 1.2rem;
    }
    
    .post-content table {
        font-size: 0.9rem;
    }
    
    .post-content table th,
    .post-content table td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .post-header,
    .post-content,
    .comments-section,
    .related-posts {
        padding: 20px;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .social-btn {
        justify-content: center;
        padding: 12px;
    }
    
    .like-button,
    .like-display {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .comment-form-wrapper {
        padding: 15px;
    }
    
    .submit-comment-btn {
        width: 100%;
        justify-self: stretch;
    }
}