/* Blog specific styles */
.blog-search {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.blog-search input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.blog-search input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.blog-search i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.blog-section {
    padding: 4rem 2rem;
    background-color: #f8f9fa;
    min-height: calc(100vh - 60px);
}

.blog-section h2 {
    font-size: 2.5rem;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-post {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.blog-post:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-post:nth-child(3) {
    animation-delay: 0.4s;
}

.blog-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2c3e50);
    border-radius: 3px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-post {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.blog-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post:hover .blog-image {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.post-meta .date::before {
    content: '📅';
    margin-right: 0.5rem;
}

.post-meta .read-time::before {
    content: '⏱️';
    margin-right: 0.5rem;
}

.post-excerpt {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background-color: #2c3e50;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.3);
}

.read-more:hover {
    background-color: #1a252f;
}

/* Blog post full page styles */
.blog-post-full {
    padding: 4rem 2rem;
}

.blog-post-full .container {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-full .post-content {
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-post-full h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin: 2rem 0;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #343a40;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-section {
        padding: 3rem 1rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-post-full h1 {
        font-size: 2rem;
    }
    
    .blog-post-full .container {
        padding: 0 1rem;
    }
    
    .post-content {
        padding: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.post-content h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul, .post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1rem 2rem;
    border-left: 4px solid #3498db;
    background: #f8f9fa;
    font-style: italic;
}

.post-content code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Footer styles */
.blog-footer {
    background: #2c3e50;
    color: #fff;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.blog-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #bdc3c7;
}

/* Dark mode support */
/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.blog-image.loading {
    background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s infinite linear;
}

@media (prefers-color-scheme: dark) {
    .blog-section {
        background-color: #ffffff;
    }
    
    .blog-post {
        background: #ffffff;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .blog-content h3 {
        color: #000000;
    }
    
    .post-meta {
        color: #0080ff;
    }
    
    .post-excerpt {
        color: #000000;
    }
    
    .read-more {
        background-color: #3498db;
    }
    
    .read-more:hover {
        background-color: #2980b9;
    }
}