/* Blog Cards Styling for ERM Website */

.blog-section {
    margin: 4rem 0;
    background-color: white;
}

.dark .blog-section {
    background-color: var(--bg-secondary);
}

.blog-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.blog-section-header img {
    margin-bottom: 1rem;
}

.blog-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.dark .blog-section-header h2 {
    color: var(--text-primary);
}

.blog-section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.dark .blog-section-header p {
    color: var(--text-secondary);
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .blog-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.dark .blog-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

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

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

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

.blog-date-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.blog-card:hover .blog-date-badge {
    background: #4b6fff;
}

.date-day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
}

.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

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

.dark .blog-title a {
    color: var(--text-primary);
}

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

.dark .blog-title a:hover {
    color: var(--orange-500);
}

.blog-excerpt {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.dark .blog-excerpt {
    color: var(--text-secondary);
}

.blog-footer {
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.dark .blog-footer {
    border-top: 1px solid var(--border-primary);
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b6fff;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    color: #3052e0;
    gap: 0.75rem;
}

.blog-read-more i,
.blog-read-more svg {
    transition: transform 0.3s ease;
    width: 1rem;
    height: 1rem;
}

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

/* Blog Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .blog-section-header h2 {
        font-size: 1.75rem;
    }
    
    .blog-image-container {
        height: 180px;
    }
    
    .blog-date-badge {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .date-day {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-image-container {
        height: 200px;
    }
}

/* Dark Theme Support */
[data-theme="dark"] .blog-card {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .blog-title a {
    color: #f9fafb;
}

[data-theme="dark"] .blog-title a:hover {
    color: #93c5fd;
}

[data-theme="dark"] .blog-excerpt {
    color: #d1d5db;
}

[data-theme="dark"] .blog-footer {
    border-top-color: #374151;
}

[data-theme="dark"] .blog-read-more {
    color: #93c5fd;
}

[data-theme="dark"] .blog-read-more:hover {
    color: #bfdbfe;
}
