/* Blog Page Styles */

/* Page Hero for Blogs */
.page-hero.blogs::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('images/heroes/blog-hero.png');
    background-size: cover;
    background-position: center;
    animation: zoomInOut 20s ease-in-out infinite;
    z-index: 0;
}

.page-hero.blogs {
    position: relative;
    height: 400px;
}

.page-hero.blogs > * {
    position: relative;
    z-index: 1;
}



/* Blog Filters */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

#category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 25px;
}

.blog-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(44, 95, 124, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 15px;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-card-author-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

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

.blog-card-author-name {
    font-weight: 500;
    color: var(--text-primary);
}

.blog-card-author-affiliation {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.blog-card-date {
    color: var(--text-secondary);
}

/* Blog Loading State */
.blog-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

/* No Posts Message */
.blog-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.blog-no-posts h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.blog-no-posts p {
    color: var(--text-secondary);
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

/* Single Blog Article Page Styles */
.blog-article-section {
    padding: 60px 0;
    margin-top: 200px;
}

.blog-article-header {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.blog-article-category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(44, 95, 124, 0.1);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.blog-article-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    line-height: 1.3;
}

.blog-article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    color: var(--text-secondary);
}

.blog-article-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-article-author-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-article-author-info {
    text-align: left;
}

.blog-article-author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.blog-article-author-affiliation {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.blog-article-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-article-featured-image {
    max-width: 900px;
    margin: 0 auto 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.blog-article-featured-image img {
    width: 900px;
    height: 400px;
    display: block;
}

.blog-article-content {
    max-width: 1000px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

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

.blog-article-content h2,
.blog-article-content h3 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--text-primary);
}

.blog-article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
}

/* Social Sharing */
.blog-share-section {
    max-width: 750px;
    margin: 50px auto 0;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.blog-share-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.blog-share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

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

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

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

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

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Like Button */
.blog-like-section {
    max-width: 750px;
    margin: 30px auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.like-btn:hover,
.like-btn.liked {
    background: var(--primary-color);
    color: white;
}

.like-btn svg {
    width: 20px;
    height: 20px;
}

.like-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Comments Section */
.blog-comments-section {
    max-width: 750px;
    margin: 50px auto 0;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 30px;
}

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

.comment-form h4 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.comment-form .form-group {
    margin-bottom: 15px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.comment-form button {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.comment-form button:hover {
    background: var(--secondary-color);
}

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

.comment-item {
    padding: 20px;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
}

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

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

.comment-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.6;
}

.comment-pending {
    font-style: italic;
    color: var(--text-secondary);
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}

/* Related Articles */
.related-articles-section {
    background: #f8f9fa;
    padding: 60px 0;
    margin-top: 60px;
}

.related-articles-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-article-title {
        font-size: 1.75rem;
    }

    .blog-article-meta {
        flex-direction: column;
        gap: 15px;
    }

    .blog-share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }

    .blog-filters {
        flex-direction: column;
        align-items: center;
    }

    #category-filters {
        justify-content: center;
    }
}
