/**
 * Modern Blog Section Styles
 * Custom styles for the enhanced blog section with animations
 */

/* Main Section Container */
.modern-blog-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

/* Horizontal Line Above Title */
.blog-section-line {
    height: 3px;
    background: linear-gradient(to right, transparent, #144261, transparent);
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 2;
    opacity: 0.8;
}

.modern-blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

/* Section Title */
.modern-blog-section .section-title-blog {
    position: relative;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #333;
    z-index: 1;
}

/* Blog Introduction Text */
.blog-intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    z-index: 1;
    position: relative;
}

/* Divider */
.blog-divider {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.blog-divider span {
    display: inline-block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    position: relative;
}

.blog-divider span::before, 
.blog-divider span::after {
    content: '';
    position: absolute;
    top: 0;
    width: 8px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    opacity: 0.6;
}

.blog-divider span::before {
    left: -15px;
}

.blog-divider span::after {
    right: -15px;
}

/* Blog Grid */
.modern-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* Modern Blog Card with Border Animation */
.blog-card {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    border: 1px solid #eaeaea;
}

.blog-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #144261;
    border-radius: 8px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

.blog-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    bottom: 0;
    background-color: #144261;
    height: 2px;
    transition: right 0.3s ease-out;
    z-index: 2;
}

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

.blog-card:hover::before {
    opacity: 1;
    transform: scale(1.02);
}

.blog-card:hover::after {
    right: 0;
}

.blog-card-inner {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.blog-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.blog-category {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    background-color: #144261;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.blog-category:hover {
    background-color: #0c2d4a;
    transform: translateY(-2px);
}

.blog-title {
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
}

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

.blog-title a:hover {
    color: #144261;
}

.blog-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #777;
}

.blog-meta .blog-date,
.blog-meta .blog-author {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.blog-meta svg {
    margin-right: 5px;
    color: #144261;
}

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

.blog-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #144261;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.blog-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: 50%;
    left: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.blog-btn:hover {
    background-color: #0c2d4a;
}

.blog-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* View All Button */
.modern-view-all {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.modern-view-all::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.modern-view-all:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.modern-view-all:hover::before {
    opacity: 1;
}

/* Animation for fade-in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .modern-blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .modern-blog-section {
        padding: 4rem 0;
    }
    
    .modern-blog-section .section-title-blog {
        font-size: 2.2rem;
    }
    
    .blog-intro-text {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .modern-blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .modern-blog-section {
        padding: 3rem 0;
    }
    
    .modern-blog-section .section-title-blog {
        font-size: 2rem;
    }
    
    .modern-blog-content .blog-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .modern-blog-section {
        padding: 2.5rem 0;
    }
    
    .modern-blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .modern-blog-section .section-title-blog {
        font-size: 1.8rem;
    }
    
    .blog-intro-text {
        font-size: 0.95rem;
    }
    
    .modern-blog-thumbnail img {
        height: 200px;
    }
    
    .modern-blog-content {
        padding: 20px;
    }
    
    .modern-blog-content .blog-title {
        font-size: 1.2rem;
    }
} 