/* =====================================================
   Blog Page Styles
   ===================================================== */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0 80px;
    color: white;
    text-align: center;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.blog-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Blog Layout */
.blog-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.blog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

/* Sidebar Styles */
.blog-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #2d3748;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.search-box button {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    background: #5568d3;
}

/* Category List */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: #f7fafc;
    color: #667eea;
    padding-left: 15px;
}

.category-list span {
    background: #e2e8f0;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post-item {
    display: flex;
    gap: 15px;
}

.recent-post-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.recent-post-content {
    flex: 1;
}

.recent-post-content a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    margin-bottom: 5px;
}

.recent-post-content a:hover {
    color: #667eea;
}

.post-date {
    font-size: 0.8rem;
    color: #718096;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 16px;
    background: #f7fafc;
    color: #4a5568;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tag:hover {
    background: #667eea;
    color: white;
}

/* Blog Main Content */
.blog-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Blog Post Card */
.blog-post {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

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

.post-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

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

.blog-post:hover .post-image img {
    transform: scale(1.1);
}

.post-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #667eea;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-content {
    padding: 30px;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.post-meta span {
    color: #718096;
    font-size: 0.9rem;
}

.post-meta i {
    margin-right: 5px;
    color: #667eea;
}

.post-content h2 {
    margin: 15px 0;
    font-size: 1.6rem;
}

.post-content h2 a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s;
}

.post-content h2 a:hover {
    color: #667eea;
}

.post-content p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.read-more:hover {
    gap: 12px;
}

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

.page-link {
    padding: 12px 18px;
    background: white;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 600;
}

.page-link:hover,
.page-link.active {
    background: #667eea;
    color: white;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    color: white;
}

.newsletter-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.newsletter-text h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 15px 30px;
    background: #2d3748;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    background: #1a202c;
}

/* =====================================================
   Single Post Page Styles
   ===================================================== */

.single-post-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.single-post-section .blog-layout {
    grid-template-columns: 1fr 320px;
}

.post-main {
    background: white;
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* Post Header */
.post-header {
    margin-bottom: 30px;
}

.post-category-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.post-header h1 {
    font-size: 2.5rem;
    color: #2d3748;
    line-height: 1.3;
    margin-bottom: 20px;
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

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

/* Post Body */
.post-body {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.05rem;
}

.post-body .lead {
    font-size: 1.25rem;
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.6;
}

.post-body h2 {
    font-size: 2rem;
    color: #2d3748;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.post-body h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin: 30px 0 15px;
}

.post-body h4 {
    font-size: 1.2rem;
    color: #2d3748;
    margin: 20px 0 10px;
}

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

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

.post-body blockquote {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 20px 30px;
    margin: 30px 0;
    font-style: italic;
    color: #2d3748;
}

.post-body blockquote p {
    margin: 0;
}

/* Info Box */
.info-box {
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.info-box h4 {
    color: #2c5282;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box i {
    color: #4299e1;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0;
}

.cta-box h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cta-box p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: white;
}

.cta-box .btn {
    margin: 0 10px;
}

.cta-box .btn-primary {
    background: white;
    color: #667eea;
}

.cta-box .btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

/* Share Buttons */
.share-buttons {
    margin: 40px 0;
    padding: 30px;
    background: #f7fafc;
    border-radius: 12px;
}

.share-buttons h4 {
    margin-bottom: 20px;
    color: #2d3748;
}

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

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

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.whatsapp { background: #25d366; }

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

/* Post Tags */
.post-tags {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.post-tags strong {
    margin-right: 15px;
    color: #2d3748;
}

.post-tags a {
    display: inline-block;
    padding: 6px 16px;
    background: #f7fafc;
    color: #4a5568;
    text-decoration: none;
    border-radius: 20px;
    margin: 5px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.post-tags a:hover {
    background: #667eea;
    color: white;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 25px;
    padding: 30px;
    background: #f7fafc;
    border-radius: 12px;
    margin: 40px 0;
}

.author-box img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    color: #2d3748;
    margin-bottom: 10px;
}

.author-info p {
    color: #4a5568;
    line-height: 1.6;
}

/* Comments Section */
.comments-section {
    margin-top: 60px;
}

.comments-section h3 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 30px;
}

/* Comment Form */
.comment-form {
    background: #f7fafc;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.comment-form h4 {
    margin-bottom: 20px;
    color: #2d3748;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

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

.comment {
    display: flex;
    gap: 20px;
}

.comment.reply {
    margin-left: 60px;
}

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

.comment-content {
    flex: 1;
}

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

.comment-header h5 {
    color: #2d3748;
    font-size: 1.1rem;
}

.admin-badge {
    background: #667eea;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 10px;
}

.comment-date {
    color: #718096;
    font-size: 0.85rem;
}

.comment-content p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 10px;
}

.reply-btn {
    background: transparent;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
}

.reply-btn:hover {
    text-decoration: underline;
}

.load-more-comments {
    width: 100%;
    padding: 15px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-comments:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid #e2e8f0;
}

.related-posts h3 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 30px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

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

.related-post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

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

.related-post-content .category {
    display: inline-block;
    background: #ebf8ff;
    color: #667eea;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.related-post-content h4 {
    margin: 10px 0;
}

.related-post-content h4 a {
    color: #2d3748;
    text-decoration: none;
    font-size: 1.1rem;
}

.related-post-content h4 a:hover {
    color: #667eea;
}

.related-post-content .date {
    color: #718096;
    font-size: 0.85rem;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

.cta-widget h3,
.cta-widget p {
    color: white !important;
    border: none !important;
}

.cta-widget .btn-block {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .single-post-section .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .post-main {
        padding: 30px;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
    
    .post-main {
        padding: 20px;
    }
    
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .comment.reply {
        margin-left: 30px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .social-share {
        flex-direction: column;
    }
    
    .share-btn {
        justify-content: center;
    }
}
