/* ===================================
   Blog Specific Styles
   =================================== */

/* Blog Hero */
.blog-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
    background: linear-gradient(135deg, #204478 0%, #4f46e5 100%);
}

.blog-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero .hero-title {
    color: #fff;
    margin-bottom: 20px;
}

.blog-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 40px;
}

/* Search Form */
.blog-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.search-wrapper i {
    color: var(--gray-color);
    margin-right: 12px;
    font-size: 1.2rem;
}

.search-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 8px;
    font-family: var(--font-primary);
}

.search-wrapper .btn {
    margin-left: 10px;
    white-space: nowrap;
}

/* Blog Layout */
.blog-content {
    padding: 60px 0;
}

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

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

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    display: block;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1;
}

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

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.blog-card-title {
    margin-bottom: 15px;
    font-size: 1.35rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--dark-color);
    transition: var(--transition);
}

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

.blog-card-excerpt {
    color: var(--gray-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

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

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

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

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--dark-color);
}

.category-list a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.category-count {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.tag {
    display: inline-block;
    background: var(--light-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.newsletter-widget .widget-title {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.newsletter-widget p {
    margin-bottom: 20px;
    opacity: 0.95;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    margin-bottom: 12px;
    font-size: 1rem;
}

.newsletter-form .btn {
    width: 100%;
    background: #fff;
    color: var(--primary-color);
}

.newsletter-form .btn:hover {
    background: var(--light-color);
}

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

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border-radius: 8px;
    background: #fff;
    color: var(--dark-color);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 4rem;
    color: var(--gray-color);
    opacity: 0.5;
    margin-bottom: 20px;
}

.no-results h3 {
    margin-bottom: 10px;
}

/* Single Post Styles */
.single-post {
    padding: 40px 0 80px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: var(--gray-color);
}

.breadcrumb a {
    color: var(--primary-color);
    transition: var(--transition);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

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

.post-category {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.post-title {
    margin-bottom: 25px;
    font-size: 2.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.author-info-large {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-info-large .author-avatar {
    width: 50px;
    height: 50px;
}

.post-date {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 5px;
}

.divider {
    margin: 0 8px;
}

.post-featured-image {
    max-width: 1000px;
    margin: 0 auto 50px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

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

.post-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.post-content {
    min-width: 0;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-light);
}

.post-body h2,
.post-body h3,
.post-body h4 {
    margin-top: 35px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.post-body p {
    margin-bottom: 20px;
}

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

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

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

.post-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 30px 0;
    background: var(--light-color);
    border-radius: 8px;
    font-style: italic;
}

.post-body code {
    background: var(--light-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.95em;
}

.post-body pre {
    background: var(--dark-color);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
}

.post-tags {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.post-tags h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.post-share {
    margin-top: 40px;
    text-align: center;
}

.post-share h4 {
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
}

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

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 25px;
    background: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 50px;
}

.author-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-bio-content h3 {
    margin-bottom: 10px;
}

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

.comments-title {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.comments-list {
    margin-bottom: 40px;
}

.comment {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.comment:last-child {
    border-bottom: none;
}

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

.comment-content {
    flex: 1;
}

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

.comment-date {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.comment-form-wrapper {
    background: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
}

.comment-form-wrapper h4 {
    margin-bottom: 20px;
}

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

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
}

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

.comment-form textarea {
    resize: vertical;
}

/* Related Posts */
.post-sidebar .sidebar-widget {
    position: sticky;
    top: 100px;
}

.related-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-post {
    display: flex;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.related-post:hover {
    background: var(--light-color);
}

.related-post img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-post h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.related-date {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .blog-layout,
    .post-content-wrapper {
        grid-template-columns: 1fr;
    }

    .blog-sidebar,
    .post-sidebar {
        position: static;
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-hero {
        min-height: 350px;
        padding: 100px 20px 60px;
    }

    .blog-hero .hero-subtitle {
        font-size: 1rem;
    }

    .search-wrapper {
        flex-direction: column;
        padding: 15px;
        border-radius: 16px;
    }

    .search-wrapper .btn {
        width: 100%;
        margin: 10px 0 0 0;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .post-meta {
        flex-direction: column;
        gap: 15px;
        text-align: left;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .post-title {
        font-size: 2rem;
    }
}

/* Filter Info */
.filter-info {
    background: var(--light-color);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-filters {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
