/* Individual Post Page Styling */

/* Layout Structure */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.main-content {
    min-width: 0; /* Prevents grid overflow */
}

.sidebar {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 8px;
}

.category-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-link {
    color: #007BFF;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.category-link:hover {
    background: #e3f2fd;
    color: #0056B3;
}

.cta-widget {
    background: linear-gradient(135deg, #007BFF, #0056B3) !important;
    color: white;
    text-align: center;
}

.post-category,
.post-category a,
.post-category a:visited,
.post-category a:hover,
.post-category a:active {
    background-color: #35516d; /* Background */
    color: #fff;                 /* White text */
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;       /* Remove underline */
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
}
.post-category a:hover {
    color: #fff; /* Keep it white on hover */
}
.cta-widget h3 {
    color: white;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}

.cta-widget p {
    margin: 15px 0;
    opacity: 0.9;
}

.cta-widget .btn {
    background: white;
    color: #007BFF;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-widget .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

.post-article {
    max-width: none;
    margin: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

.post-header {
    padding: 40px;
    border-bottom: 1px solid #e0e0e0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.post-meta .category a {
    background: linear-gradient(135deg, #007BFF, #0056B3);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.post-meta .category a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.post-meta .date {
    color: #666;
    font-size: 0.9em;
}

.post-meta .views {
    color: #666;
    font-size: 0.9em;
    margin-left: auto;
}

.post-article h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0 0 20px 0;
    line-height: 1.2;
    font-weight: 700;
}

.post-excerpt {
    font-size: 1.2em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #007BFF;
    border-radius: 5px;
}

.author-info {
    color: #666;
    font-style: italic;
}

.post-content {
    padding: 40px;
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
}

.post-content p {
    margin-bottom: 20px;
}

/* Quill.js Content Styling */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #2c3e50;
}

.post-content h1 { font-size: 2.2em; }
.post-content h2 { font-size: 1.8em; }
.post-content h3 { font-size: 1.5em; }
.post-content h4 { font-size: 1.3em; }
.post-content h5 { font-size: 1.2em; }
.post-content h6 { font-size: 1.1em; }

.post-content strong {
    font-weight: bold;
}

.post-content em {
    font-style: italic;
}

.post-content u {
    text-decoration: underline;
}

.post-content s {
    text-decoration: line-through;
}

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.post-content blockquote {
    border-left: 4px solid #007BFF;
    margin: 25px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
}

.post-content pre {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

.post-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-content a {
    color: #007BFF;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.post-content a:hover {
    border-bottom-color: #007BFF;
}

.post-footer {
    padding: 40px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.post-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.post-actions .btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.post-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.share-buttons h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.share-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.facebook {
    background: #4267B2;
}

.share-btn.linkedin {
    background: #0077b5;
}

/* Related Posts */
.related-posts {
    margin: 40px 0;
}

.related-posts h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.related-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.related-content {
    padding: 25px;
}

.related-card .post-meta {
    margin-bottom: 15px;
}

.related-card .category {
    font-size: 0.8em;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 15px;
}

.related-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
}

.related-card h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-card h3 a:hover {
    color: #007BFF;
}

.related-card p {
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.related-card .read-more {
    color: #007BFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.related-card .read-more:hover {
    color: #0056B3;
}

/* CTA Section */
.post-cta {
    background: linear-gradient(135deg, #007BFF, #0056B3);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin: 40px 0;
    color: white;
}

.post-cta h3 {
    font-size: 2em;
    margin-bottom: 15px;
}

.post-cta p {
    font-size: 1.1em;
    margin-bottom: 25px;
    opacity: 0.9;
}

.cta-btn {
    background: white !important;
    color: #007BFF !important;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0;
    color: #ffffff;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumbs a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: #f0f8ff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.breadcrumbs span:not(:last-child) {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs span:last-child {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        order: -1; /* Move sidebar above content on mobile */
        position: static;
        padding: 20px;
    }
    
    .sidebar-widget {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .post-article h1 {
        font-size: 2em;
    }
    
    .post-header,
    .post-content,
    .post-footer {
        padding: 25px;
    }
    
    .post-meta {
        gap: 10px;
    }
    
    .post-meta .views {
        margin-left: 0;
    }
    
    .post-actions {
        flex-direction: column;
    }
    
    .post-actions .btn {
        text-align: center;
    }
    
    .share-links {
        justify-content: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .post-cta {
        padding: 25px;
    }
    
    .post-cta h3 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .post-article h1 {
        font-size: 1.8em;
    }
    
    .post-excerpt {
        font-size: 1.1em;
        padding: 15px;
    }
    
    .post-content {
        font-size: 1em;
        padding: 20px;
    }
    
    .post-header,
    .post-footer {
        padding: 20px;
    }
}
