/* Blog Section Styles */
.blog-section {
    background-color: #f8fafc;
    position: relative;
    overflow: hidden;
}

.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/pattern-bg.svg');
    background-size: 500px;
    opacity: 0.05;
    z-index: 0;
}

.blog-section .container {
    position: relative;
    z-index: 1;
}

/* Featured Blog Post */
.blog-featured-container {
    margin-bottom: 50px;
}

.blog-featured {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.blog-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 152, 219, 0) 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 8px;
}

.blog-featured:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.blog-featured:hover::before {
    opacity: 1;
}

.blog-featured-image {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
}

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

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

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 2;
}

.blog-card:hover .blog-category {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    background-color: #2980b9;
}

.blog-category::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.blog-card:hover .blog-category::after {
    left: 100%;
    transition: 0.5s;
}

.blog-featured-content {
    flex: 0 0 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blog-featured-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    opacity: 0;
    transform: translate(50%, 50%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.blog-featured:hover .blog-featured-content::after {
    opacity: 1;
    transform: translate(30%, 30%);
}

.blog-featured-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.4;
    position: relative;
    display: inline-block;
    color: #2c3e50;
}

.blog-featured-content h3::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

.blog-featured:hover .blog-featured-content h3::before {
    width: 100%;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #7f8c8d;
}

.blog-meta span {
    display: flex;
    align-items: center;
}

.blog-meta i {
    margin-right: 6px;
    color: #3498db;
}

.blog-excerpt {
    margin-bottom: 25px;
    color: #5d6d7e;
    line-height: 1.6;
    flex-grow: 1;
}

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

.blog-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 8px;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
    transition: transform 0.5s ease;
    transform-origin: center;
}

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

.blog-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card-content h3 a {
    color: #2c3e50;
    transition: color 0.3s ease;
}

.blog-card-content h3 a:hover {
    color: #3498db;
}

.blog-card .blog-meta {
    margin-bottom: 15px;
}

.blog-card .blog-excerpt {
    font-size: 15px;
    margin-bottom: 15px;
}

.blog-card-content .read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: auto;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 22px;
}

.blog-card-content .read-more::after {
    content: '\2192';
    position: absolute;
    right: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.blog-card-content .read-more:hover {
    color: var(--secondary-color);
    padding-right: 30px;
}

.blog-card-content .read-more:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Blog Categories */
.blog-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.category-tag {
    background-color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    color: #2c3e50;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-tag:hover {
    background-color: #3498db;
    color: #fff;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.category-tag i {
    margin-right: 6px;
    color: #3498db;
}

.category-tag:hover i {
    color: #fff;
}

/* View All Button */
.blog-view-all {
    text-align: center;
    margin-top: 30px;
}

.blog-view-all .btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 992px) {
    .blog-featured {
        flex-direction: column;
    }
    
    .blog-featured-image,
    .blog-featured-content {
        flex: 0 0 100%;
    }
    
    .blog-featured-image {
        height: 300px;
    }
    
    .blog-featured-content {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .blog-featured-content h3 {
        font-size: 20px;
    }
    
    .blog-meta {
        gap: 10px;
    }
    
    .blog-card-image {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .blog-featured-image {
        height: 200px;
    }
    
    .blog-featured-content {
        padding: 20px;
    }
    
    .blog-featured-content h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .blog-categories {
        gap: 10px;
    }
    
    .category-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
}
