/* Blog Specific Styles */

/* Blog Header */
.blog-header {
    padding: 100px 0 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

.blog-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.blog-subtitle {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Layout */
.blog-main {
    padding-top: 70px;
}

.blog-content {
    padding: 40px 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Blog Posts */
.blog-posts {
    width: 100%;
}

.blog-filters {
    margin-bottom: 3rem;
}

.blog-filters h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db;
    background: white;
    color: #6b7280;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: #1F5A82;
    background: #1F5A82;
    color: white;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid #63B73E;
}

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

.post-card-image {
    height: 200px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.post-card-image .placeholder-icon {
    font-size: 3rem;
    color: white;
    opacity: 0.7;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.post-card-category {
    background: #e0f2fe;
    color: #1F5A82;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card-title a:hover {
    color: #1F5A82;
}

.post-card-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.post-card-read-more {
    color: #1F5A82;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.post-card-read-more:hover {
    color: #63B73E;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1F5A82;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: #1F5A82;
    color: white;
    border-color: #1F5A82;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sidebar */
.blog-sidebar {
    width: 100%;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #63B73E;
}

.sidebar-widget h3,
.sidebar-widget h4 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
}

.sidebar-widget h4 {
    font-size: 1.1rem;
}

.sidebar-widget p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Newsletter Form */
.newsletter-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #1F5A82;
    box-shadow: 0 0 0 3px rgba(31, 90, 130, 0.1);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Popular Posts */
.popular-posts,
.read-next-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post,
.read-next-post {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.popular-post:last-child,
.read-next-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post-image,
.read-next-post-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.popular-post-image img,
.read-next-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.popular-post-image i,
.read-next-post-image i {
    color: white;
    font-size: 1.25rem;
}

.popular-post-content,
.read-next-post-content {
    flex: 1;
}

.popular-post-title,
.read-next-post-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.popular-post-title a,
.read-next-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-post-title a:hover,
.read-next-post-title a:hover {
    color: #1F5A82;
}

.popular-post-date,
.read-next-post-date {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Categories List */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.category-item:last-child {
    border-bottom: none;
}

.category-name {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-name:hover {
    color: #1F5A82;
}

.category-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Ad Widget */
.ad-widget {
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    color: white;
    border-left: none;
}

.ad-widget h4,
.ad-widget h5 {
    color: white;
}

.ad-widget p {
    color: rgba(255, 255, 255, 0.9);
}

.ad-content {
    text-align: center;
}

.ad-image {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.ad-image i {
    font-size: 1.5rem;
    color: white;
}

/* Promo Widget */
.promo-widget {
    background: #f8fafc;
    border-left-color: #1F5A82;
}

.promo-content {
    text-align: center;
}

/* Social Links Sidebar */
.social-links-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link-sidebar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-link-sidebar:hover {
    background: #f3f4f6;
    color: #1F5A82;
}

.social-link-sidebar i {
    width: 20px;
    text-align: center;
}

/* Blog Post Single View */
.breadcrumb {
    padding: 100px 0 20px;
    background: #f8fafc;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb-nav a {
    color: #1F5A82;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #63B73E;
}

.breadcrumb-nav i {
    font-size: 0.75rem;
}

/* Blog Post Content */
.blog-post-content {
    width: 100%;
}

.post-content {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.post-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.post-category {
    background: #e0f2fe;
    color: #1F5A82;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #1f2937;
}

.author-title {
    font-size: 0.875rem;
    color: #6b7280;
}

.post-featured-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.post-featured-image i {
    font-size: 4rem;
    color: white;
    opacity: 0.7;
}

.post-body {
    padding: 2rem;
    line-height: 1.8;
    color: #374151;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    color: #1f2937;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.post-body h1 { font-size: 2rem; }
.post-body h2 { font-size: 1.75rem; }
.post-body h3 { font-size: 1.5rem; }
.post-body h4 { font-size: 1.25rem; }

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

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

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body blockquote {
    border-left: 4px solid #63B73E;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f8fafc;
    font-style: italic;
    color: #4b5563;
}

.post-body code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: #1f2937;
}

.post-body pre {
    background: #1f2937;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: #d1d5db;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-tags {
    padding: 1rem 2rem;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.post-tags h4 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #1F5A82;
    color: white;
}

/* Social Share */
.post-share {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.post-share h4 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

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

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

.share-btn.copy {
    background: #6b7280;
    color: white;
}

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

/* Author Bio */
.author-bio {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 1.5rem;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
}

.author-details h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.author-details p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 0.75rem;
}

.author-social a {
    color: #6b7280;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.author-social a:hover {
    color: #1F5A82;
}

/* Related Posts */
.related-posts {
    padding: 2rem;
}

.related-posts h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
}

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

.related-post {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-post:hover {
    border-color: #1F5A82;
    transform: translateY(-2px);
}

.related-post-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.related-post-image i {
    color: white;
    font-size: 1.5rem;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

.related-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #1F5A82;
}

.related-post-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Table of Contents */
.toc-widget {
    position: sticky;
    top: 90px;
}

.table-of-contents {
    max-height: 400px;
    overflow-y: auto;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

.table-of-contents a:hover,
.table-of-contents a.active {
    color: #1F5A82;
}

.table-of-contents ul ul {
    margin-left: 1rem;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-sidebar {
        order: -1;
    }
    
    .sidebar-widget {
        margin-bottom: 1.5rem;
    }
    
    .blog-header {
        padding: 90px 0 35px;
    }
    
    .blog-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 80px 0 30px;
    }
    
    .blog-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .blog-content {
        padding: 30px 0;
    }
    
    .blog-layout {
        gap: 1.5rem;
    }
    
    .blog-filters {
        margin-bottom: 2rem;
    }
    
    .filter-buttons {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .post-card-content {
        padding: 1.25rem;
    }
    
    .post-card-title {
        font-size: 1.1rem;
    }
    
    .post-card-image {
        height: 180px;
    }
    
    .sidebar-widget {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    /* Single Post Styles */
    .post-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .post-header,
    .post-body,
    .post-share,
    .author-bio,
    .related-posts {
        padding: 1.5rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .share-buttons {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-featured-image {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 70px 0 25px;
    }
    
    .blog-title {
        font-size: 1.5rem;
        line-height: 1.1;
    }
    
    .blog-subtitle {
        font-size: 0.9rem;
    }
    
    .blog-content {
        padding: 25px 0;
    }
    
    .blog-filters {
        margin-bottom: 1.5rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
        padding: 0.6rem 1rem;
    }
    
    .posts-grid {
        gap: 1rem;
    }
    
    .post-card-content {
        padding: 1rem;
    }
    
    .post-card-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .post-card-excerpt {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .post-card-image {
        height: 160px;
    }
    
    .post-card-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .sidebar-widget {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .sidebar-widget h3,
    .sidebar-widget h4 {
        font-size: 1rem;
    }
    
    .popular-post {
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .popular-post-image,
    .read-next-post-image {
        width: 50px;
        height: 50px;
    }
    
    .popular-post-title,
    .read-next-post-title {
        font-size: 0.8rem;
    }
    
    /* Single Post Mobile Styles */
    .post-title {
        font-size: 1.5rem;
        line-height: 1.1;
    }
    
    .post-header,
    .post-body,
    .post-share,
    .author-bio,
    .related-posts {
        padding: 1rem;
    }
    
    .post-body {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .post-body h1,
    .post-body h2,
    .post-body h3,
    .post-body h4 {
        margin: 1.5rem 0 0.75rem;
    }
    
    .post-body h2 {
        font-size: 1.4rem;
    }
    
    .post-body h3 {
        font-size: 1.2rem;
    }
    
    .post-body h4 {
        font-size: 1.1rem;
    }
    
    .post-featured-image {
        height: 200px;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .share-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .related-posts-grid {
        gap: 0.75rem;
    }
    
    .related-post-content {
        padding: 1rem;
    }
    
    .related-post-image {
        height: 100px;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 40px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .blog-title {
        font-size: 1.25rem;
    }
    
    .post-title {
        font-size: 1.25rem;
    }
    
    .post-card-content,
    .sidebar-widget,
    .post-header,
    .post-body,
    .post-share,
    .author-bio,
    .related-posts {
        padding: 0.75rem;
    }
    
    .post-card-title {
        font-size: 0.9rem;
    }
    
    .post-body {
        font-size: 0.9rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .share-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .filter-btn,
    .pagination-btn,
    .share-btn {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    .post-card:hover {
        transform: none; /* Disable hover effects on touch devices */
    }
    
    .service-card:hover,
    .process-step:hover,
    .stat:hover {
        transform: none;
    }
}
