/* Blog Page Styles */
.blog-main {
    padding-top: 60px;
}

.blog-hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.blog-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #007bff;
    border-radius: 25px;
    background: transparent;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.category-btn:hover,
.category-btn.active {
    background: #007bff;
    color: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

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

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 15px;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.blog-content h2 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    color: #333;
    line-height: 1.4;
}

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

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.875rem;
    color: #666;
}

.read-time i,
.read-more i {
    margin-right: 0.25rem;
}

.read-more {
    color: #007bff;
    font-weight: 500;
}

.read-more i {
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

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

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .category-nav {
        overflow-x: auto;
        padding: 1rem 0;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .category-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-btn {
        width: 100%;
        text-align: center;
    }
    
    .blog-hero h2 {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }
}

/* Improved Responsive Design */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }
    
    .category-nav {
        padding: 1rem 0.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    
    .blog-hero h2 {
        font-size: 1.8rem;
    }
}

/* Animation Refinements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered Animation for Cards */
.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; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

/* Print Styles */
@media print {
    .header,
    .category-nav,
    .blog-hero,
    .footer {
        display: none;
    }
    
    .blog-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Footer Styles */
.footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--light-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p,
.footer-section a {
    color: #a0a0a0;
    margin-bottom: 0.5rem;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--light-color);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-contact-item i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.footer-hours {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: #a0a0a0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: #a0a0a0;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--light-color);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact-item {
        justify-content: center;
    }
    
    .footer-hours {
        justify-content: center;
        text-align: left;
    }
}

/* Blog Post Styles */
.blog-post {
    padding-top: 80px;
}

.blog-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-header h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.article-meta {
    color: var(--text-color);
    font-size: 0.9em;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-meta i {
    color: var(--primary-color);
}

.article-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin: 40px 0 20px;
}

.article-content h3 {
    color: var(--primary-color);
    font-size: 1.4em;
    margin: 30px 0 15px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #666;
}

.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.article-tags {
    margin-bottom: 30px;
}

.article-tags a {
    display: inline-block;
    padding: 5px 15px;
    margin: 5px;
    background: #f5f5f5;
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.article-tags a:hover {
    background: var(--primary-color);
    color: white;
}

.article-share {
    text-align: center;
    margin-bottom: 40px;
}

.article-share h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.share-button:hover {
    transform: translateY(-3px);
}

.share-button.facebook {
    background: #3b5998;
}

.share-button.twitter {
    background: #1da1f2;
}

.share-button.linkedin {
    background: #0077b5;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-navigation a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.article-navigation a:hover {
    color: var(--secondary-color);
}

.related-articles {
    background: #f9f9f9;
    padding: 60px 0;
}

.related-articles h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2em;
    }

    .article-content {
        font-size: 1em;
    }

    .article-navigation {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
