/* ========================================
   NextAgent.tech - Blog Page CSS
   ======================================== */

/* ============ Blog Hero ============ */
.blog-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    padding: 120px 0 80px;
    margin-top: 70px;
    text-align: center;
    color: white;
}

.blog-hero .hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.blog-hero .hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ============ Blog Content ============ */
.blog-content {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.filter-btn {
    padding: 10px 25px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: #666;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* ============ 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: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.blog-card-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

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

.blog-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

body[dir="rtl"] .blog-card-category {
    left: auto;
    right: 15px;
}

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

.blog-card-title {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-card-excerpt {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #999;
}

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

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.blog-tag {
    background: #f8f9fa;
    color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ============ Load More ============ */
.load-more-wrapper {
    text-align: center;
}

/* ============ Newsletter Section ============ */
.newsletter {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e39410 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
}

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

.newsletter-form button {
    padding: 15px 30px;
    background: var(--secondary-color);
    border: none;
    cursor: pointer;
}

.newsletter-form button:hover {
    background: var(--tertiary-color);
}

/* ============ Blog Post Page ============ */
.post-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    padding: 120px 0 80px;
    margin-top: 70px;
    color: white;
}

.post-hero .container {
    max-width: 900px;
}

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

.post-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    gap: 30px;
    font-size: 1rem;
    opacity: 0.9;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-content-wrapper {
    padding: 80px 0;
    background: white;
}

.post-content-wrapper .container {
    max-width: 800px;
}

.post-featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin: 40px 0 20px;
}

.post-content h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 30px 0 15px;
}

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

.post-content ul,
.post-content ol {
    margin: 20px 0 20px 30px;
}

body[dir="rtl"] .post-content ul,
body[dir="rtl"] .post-content ol {
    margin: 20px 30px 20px 0;
}

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

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.post-tag {
    background: var(--bg-light);
    color: var(--secondary-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.post-tag:hover {
    background: var(--primary-color);
    color: white;
}

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

.post-share h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

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

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

.share-btn:hover {
    transform: translateY(-5px);
}

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

.related-posts {
    padding: 80px 0;
    background: var(--bg-light);
}

.related-posts h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 50px;
}

/* ============ Responsive Design ============ */
@media (max-width: 768px) {
    .blog-hero .hero-title {
        font-size: 2rem;
    }

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

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }

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

    .post-meta {
        flex-direction: column;
        gap: 10px;
    }

    .post-featured-image {
        height: 300px;
    }
}