/* Blog Section Styles */
.blog-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.blog-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.blog-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
}

.blog-section .section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.blog-section .section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

/* Blog Card Styles */
.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    transform: translateY(0);
}

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

/* Blog Image */
.blog-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

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

.blog-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.blog-date .day {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.blog-date .month {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Blog Content */
.blog-content {
    padding: 25px;
}

.blog-category {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.blog-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-content h3 {
    color: var(--primary-color);
}

.blog-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Read More Button */
.blog-read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.blog-read-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.blog-read-more:hover {
    color: var(--secondary-color);
}

.blog-read-more:hover i {
    transform: translateX(-5px);
}

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

.blog-view-all .btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.blog-view-all .btn:hover::before {
    left: 100%;
}

.blog-view-all .btn i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.blog-view-all .btn:hover i {
    transform: translateX(-5px);
}

/* Blog Loading Animation */
.blog-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

.blog-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-section {
        padding: 60px 0;
    }
    
    .blog-section .section-header h2 {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .blog-image {
        height: 200px;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
    }
    
    .blog-view-all .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-section {
        padding: 40px 0;
    }
    
    .blog-section .section-header h2 {
        font-size: 1.8rem;
    }
    
    .blog-section .section-header p {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .blog-image {
        height: 180px;
    }
    
    .blog-content {
        padding: 15px;
    }
    
    .blog-content h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .blog-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
}

/* Blog Hover Effects */
.blog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 201, 195, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

/* Blog Category Colors */
.blog-category.eye-care {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.blog-category.glasses {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

.blog-category.protection {
    background: linear-gradient(45deg, #f39c12, #d68910);
}

.blog-category.lenses {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

/* No Posts Message */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.no-posts i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.no-posts h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.no-posts p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Dynamic Blog Categories */
.blog-grid .blog-category {
    text-transform: capitalize;
}

/* Reading Time Style */
.reading-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.reading-time i {
    margin-left: 5px;
    font-size: 0.7rem;
}
