/* Premium Blog Styles - NumberBook Saudi */

:root {
    --blog-card-bg: rgba(255, 255, 255, 0.8);
    --blog-card-border: rgba(255, 255, 255, 0.5);
    --gold-accent: #FFD700;
    --green-dark: #006C35;
    --green-light: #28A745;
}

.blog-preview {
    background: linear-gradient(135deg, #f7fcf8 0%, #e8f5e9 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

/* Background decoration */
.blog-preview::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(40, 167, 69, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.blog-preview .container {
    position: relative;
    z-index: 1;
}

.section-header .section-title {
    background: linear-gradient(45deg, var(--green-dark), var(--green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-header .section-subtitle {
    color: #555;
    font-size: 1.1rem;
    margin-top: 5px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.blog-card {
    background: var(--blog-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    display: flex;
    flex-direction: column;
    position: relative;
}

.blog-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-dark), var(--gold-accent));
    transition: width 0.4s ease;
}

.blog-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 108, 53, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
}

.blog-card:hover::after {
    width: 100%;
}

.blog-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

/* Overlay gradient on image */
.blog-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-image::after {
    opacity: 1;
}

.blog-content {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-content h3 {
    color: var(--green-dark);
}

.blog-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-dark);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
    padding: 8px 0;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--gold-accent);
    /* Gold on hover */
    letter-spacing: 0.5px;
}

.read-more:hover i {
    transform: translateX(-5px);
}

/* View All Button */
.view-all-btn-container {
    text-align: center;
    margin-top: 1rem;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: #fff;
    color: var(--green-dark);
    border: 2px solid var(--green-dark);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--green-dark);
    transition: width 0.3s ease;
    z-index: -1;
}

.view-all-btn:hover {
    color: #fff;
    border-color: var(--green-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 108, 53, 0.2);
}

.view-all-btn:hover::before {
    width: 100%;
}

.view-all-btn i {
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .blog-image {
        height: 200px;
    }
}