/* Blog Page Specific Styles */
.blog-page-section {
    padding: 60px 0;
    background-color: var(--white);
}

.blog-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.blog-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 0; /* Remove default margin from h1 */
    text-align: left;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 280px; /* Minimum width for the search bar */
}

#blog-search {
    padding: 12px 40px 12px 20px; /* Add padding for icon */
    border: 1px solid var(--border-color);
    border-radius: 25px; /* Pill shape */
    font-size: 1rem;
    width: 100%;
    background-color: var(--light-bg);
    color: var(--text-color);
}

#blog-search:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
}

.blog-grid {
    display: grid;
    /* Default to 1 column for smaller screens, will be overridden by media query */
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Medium screens - 2 columns */
@media (min-width: 600px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens - 3 columns */
@media (min-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-dark);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure link takes full card height */
}

.blog-card-image {
    width: 100%;
    height: 220px; /* Fixed height for images */
    object-fit: cover; /* Crop images to fit */
    border-bottom: 1px solid var(--border-color);
}

.blog-card-image-placeholder {
    width: 100%;
    height: 220px;
    background-color: #f0f0f0; /* Light gray for placeholder */
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.placeholder-icon {
    font-size: 4rem;
    color: #ccc; /* Lighter gray for icon */
}

.blog-card-content {
    padding: 20px;
    flex-grow: 1; /* Allow content to fill remaining space */
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.25rem;
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
    /* Remove text-align: center if titles should be left-aligned by default */
}

.blog-card-date {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: auto; /* Push date to the bottom of the card content */
}

/* Blog Post Page Specific Styles */
.blog-post-section {
    padding: 60px 0;
}

.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--box-shadow-light);
}

.blog-post-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: left;
}

.blog-post-meta {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.blog-post-content h2 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    margin-top: 25px;
    margin-bottom: 10px;
    text-align: left;
}

.blog-post-content p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.blog-post-content li {
    margin-bottom: 8px;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: var(--box-shadow-light);
}

.back-to-blog-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--secondary-color);
    font-weight: 600;
}

.back-to-blog-link i {
    margin-right: 8px;
}

.back-to-blog-link:hover {
    text-decoration: underline;
}

/* Responsive adjustments for blog */
@media (max-width: 768px) {
    .blog-header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .blog-title {
        margin-bottom: 20px; /* Add space below title on mobile */
    }
    .search-container {
        width: 100%; /* Full width on mobile */
        margin-bottom: 20px; /* Space below search bar */
    }
    .blog-grid {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }
    .blog-post-title {
        font-size: 2rem;
    }
    .blog-post-container {
        padding: 20px;
    }
} 