/* Import shared styles */
@import url('index.css');

/* Blog Page Specific Styles */
.hero {
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    padding: 8rem 0 4rem;
    text-align: center;
    color: #1f2937;
    min-height: auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.hero p {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Posts Section */
.blog-posts {
    padding: 4rem 0;
    background: white;
}

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

.blog-card {
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

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

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.category {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.date {
    color: #6b7280;
    font-size: 0.875rem;
}

.blog-card h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover h3 {
    color: #2563eb;
}

.blog-card p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.author {
    color: #4b5563;
    font-size: 0.875rem;
}

.read-time {
    color: #6b7280;
    font-size: 0.875rem;
}

.read-more-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.read-more-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.newsletter-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.newsletter-cta p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.newsletter-cta .newsletter-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-cta .newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-cta .newsletter-form .btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #2563eb;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-cta .newsletter-form .btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

/* Blog Post Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #6b7280;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close:hover {
    color: #ef4444;
    background: #fef2f2;
}

.modal-body {
    padding: 2rem;
    padding-top: 3rem;
}

.blog-post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.blog-post-header .category {
    margin-bottom: 1rem;
    display: inline-block;
}

.blog-post-header h2 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.blog-post-header .meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.blog-post-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin: 2rem 0;
}

.blog-post-content {
    color: #4b5563;
    line-height: 1.8;
    font-size: 1.1rem;
}

.blog-post-content h3 {
    color: #1f2937;
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.blog-post-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 3rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

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

    .blog-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .newsletter-cta h2 {
        font-size: 2rem;
    }

    .newsletter-cta p {
        font-size: 1.1rem;
    }

    .newsletter-cta .newsletter-form {
        flex-direction: column;
        max-width: 300px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-body {
        padding: 1.5rem;
        padding-top: 3rem;
    }

    .blog-post-header h2 {
        font-size: 1.75rem;
    }

    .blog-post-header .meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-post-image {
        height: 200px;
    }
}

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

    .blog-content {
        padding: 1rem;
    }

    .blog-card h3 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 1rem;
        padding-top: 3rem;
    }

    .blog-post-header h2 {
        font-size: 1.5rem;
    }

    .blog-post-content {
        font-size: 1rem;
    }
}