/* Post Styles for PhloxCMS */

/* Page Header Styles */
.page-header {
    position: relative;
    color: white; /* Ensure text is readable */
    padding: 80px 0;
}

.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
}
.page-header .container {
    position: relative;
    z-index: 2;
}


.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #212529;
    font-weight: 700;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-header .post-category {
    margin-bottom: 15px;
}

.page-header .post-category a {
    display: inline-block;
    padding: 5px 15px;
    background-color: #007bff;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.page-header .post-category a:hover {
    background-color: #0056b3;
}

.post-meta {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    color: #6c757d;
    flex-wrap: wrap;
}

.post-meta .meta-item {
    margin: 0 15px;
    display: flex;
    align-items: center;
}

.post-meta .meta-item i {
    margin-right: 6px;
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    justify-content: center;
    flex-wrap: wrap;
}

.breadcrumb li {
    font-size: 0.9rem;
    color: #6c757d;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 8px;
    color: #6c757d;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .active {
    color: #6c757d;
}

/* Content Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 50px 0;
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Main Content */
.main-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    overflow: hidden;
}

.featured-image {
    margin: -30px -30px 30px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-image:hover img {
    transform: scale(1.03);
}

.post-excerpt {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #495057;
    font-weight: 500;
    border-left: 4px solid #007bff;
    padding-left: 20px;
    margin-bottom: 30px;
}

.post-content-container {
    width: 100%;
    height: 1000px;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #212529;
    margin-bottom: 30px;
}

.post-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: #212529;
}

.post-body h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: #343a40;
}

.post-body p {
    margin-bottom: 20px;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.post-body ul, .post-body ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.post-body li {
    margin-bottom: 10px;
}

.post-body blockquote {
    border-left: 4px solid #007bff;
    padding: 15px;
    background-color: #f8f9fa;
    margin: 20px 0;
    font-style: italic;
    color: #495057;
}

.post-body a {
    color: #007bff;
    text-decoration: none;
}

.post-body a:hover {
    text-decoration: underline;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

.post-body table th,
.post-body table td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
}

.post-body table th {
    background-color: #f8f9fa;
}

/* Attachments */
.post-attachments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.post-attachments h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #343a40;
}

.attachments-list {
    list-style: none;
    padding: 0;
}

.attachments-list li {
    margin-bottom: 10px;
}

.attachments-list a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: #212529;
    transition: background-color 0.3s;
}

.attachments-list a:hover {
    background-color: #e9ecef;
}

.attachments-list i {
    font-size: 1.4rem;
    margin-right: 10px;
    color: #007bff;
}

.attachments-list .file-size {
    margin-left: auto;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Tags */
.post-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.post-tags h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #343a40;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 6px 15px;
    background-color: #f8f9fa;
    border-radius: 20px;
    color: #495057;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background-color: #007bff;
    color: white;
}

/* Social Share */
.post-share {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.post-share h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #343a40;
}

.social-share {
    display: flex;
    gap: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: transform 0.3s, background-color 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.facebook {
    background-color: #3b5998;
}

.twitter {
    background-color: #1da1f2;
}

.linkedin {
    background-color: #0077b5;
}

.email {
    background-color: #ea4335;
}

/* Sidebar Styles */
.sidebar-widget {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #343a40;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

/* Author Widget */
.author-info {
    display: flex;
    align-items: center;
}

.author-image {
    margin-right: 15px;
}

.author-image .avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.author-bio h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #212529;
}

.author-bio p {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Related Posts Widget */
.related-post-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f8f9fa;
}

.related-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-thumbnail {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-thumbnail:hover img {
    transform: scale(1.1);
}

.post-info h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.post-info h4 a {
    color: #343a40;
    text-decoration: none;
    transition: color 0.3s;
}

.post-info h4 a:hover {
    color: #007bff;
}

.post-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.post-date i {
    margin-right: 5px;
}

/* Newsletter Widget */
.newsletter-form .form-group {
    margin-bottom: 15px;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.95rem;
}

.newsletter-form .btn {
    width: 100%;
    padding: 12px;
    font-weight: 600;
}

/* Error Section */
.error-section {
    padding: 80px 0;
    text-align: center;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-content h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #dc3545;
}

.error-content p {
    margin-bottom: 30px;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Comments Section */
.comments-section {
    padding: 50px 0;
    background-color: #f8f9fa;
}

.comments-section h2 {
    margin-bottom: 30px;
    text-align: center;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-align: center;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Add these styles to your post.css file or style section */

.rich-text-content {
    line-height: 1.6;
    font-size: 1.1em;
    color: #333;
}

.rich-text-content h1 {
    font-size: 2.2em;
    margin: 1em 0 0.5em;
}

.rich-text-content h2 {
    font-size: 1.8em;
    margin: 1em 0 0.5em;
}

.rich-text-content h3 {
    font-size: 1.5em;
    margin: 1em 0 0.5em;
}

.rich-text-content p {
    margin-bottom: 1.2em;
}

.rich-text-content ul, .rich-text-content ol {
    margin: 0 0 1.2em 2em;
}

.rich-text-content ul li, .rich-text-content ol li {
    margin-bottom: 0.5em;
}

.rich-text-content img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

.rich-text-content blockquote {
    border-left: 4px solid #ddd;
    padding: 0 0 0 1em;
    margin: 1em 0;
    font-style: italic;
    color: #555;
}

.rich-text-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.rich-text-content table th, .rich-text-content table td {
    border: 1px solid #ddd;
    padding: 0.5em;
}

.rich-text-content pre, .rich-text-content code {
    background-color: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}

/* TinyMCE specific classes */
.rich-text-content img.alignleft {
    float: left;
    margin: 0 1em 0.5em 0;
}

.rich-text-content img.alignright {
    float: right;
    margin: 0 0 0.5em 1em;
}

.rich-text-content img.aligncenter {
    display: block;
    margin: 1em auto;
}

.rich-text-content .wp-caption {
    max-width: 100%;
}

.rich-text-content .wp-caption-text {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-top: 0.5em;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 40px 0 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .content-grid {
        margin: 30px 0;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .featured-image {
        margin: -20px -20px 20px;
    }
    
    .post-excerpt {
        font-size: 1.1rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .social-share {
        justify-content: center;
    }
}