/* style/blog.css */

/* Base styling for the blog page content, ensuring it respects header offset */
.page-blog {
    color: #333333; /* Dark text for light body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9; /* Slightly off-white background for main content area */
    padding-top: var(--header-offset, 120px); /* Ensures content starts below the fixed header */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    overflow: hidden; /* Ensure image doesn't overflow */
    padding: 80px 20px;
    text-align: center;
    color: #ffffff; /* White text for hero section */
    background-color: #007bff; /* Primary brand color for hero background */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-blog__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.3; /* Make background image subtle */
}

.page-blog__hero-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.page-blog__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-blog__hero-button {
    display: inline-block;
    background-color: #dc3545; /* Secondary brand color for button */
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-button:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* Articles Section (Card Grid) */
.page-blog__articles-section {
    padding: 60px 20px;
    background-color: #ffffff;
}

.page-blog__articles-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-blog__section-title {
    font-size: 2.2em;
    color: #007bff;
    text-align: center;
    margin-bottom: 15px;
}

.page-blog__section-subtitle {
    font-size: 1.1em;
    color: #666666;
    text-align: center;
    margin-bottom: 40px;
}

.page-blog__article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-blog__article-card {
    background-color: #fefefe;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__article-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Ensure images are not too small */
    min-height: 200px;
}

.page-blog__article-content {
    padding: 25px;
    flex-grow: 1; /* Allows content to expand */
    display: flex;
    flex-direction: column;
}

.page-blog__article-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333333;
    line-height: 1.3;
}

.page-blog__article-title a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #0056b3;
}

.page-blog__article-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allows excerpt to take available space */
}

.page-blog__read-more-button {
    display: inline-block;
    background-color: #007bff;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    align-self: flex-start; /* Align button to the start */
    transition: background-color 0.3s ease;
}

.page-blog__read-more-button:hover {
    background-color: #0056b3;
}

/* Detailed Articles Section */
.page-blog__detailed-articles {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.page-blog__detailed-container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-blog__detailed-section-title {
    font-size: 2.2em;
    color: #007bff;
    text-align: center;
    margin-bottom: 40px;
}

.page-blog__full-article {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-blog__full-article-title {
    font-size: 1.8em;
    color: #dc3545; /* Secondary color for article titles */
    margin-bottom: 15px;
}

.page-blog__full-article-image {
    width: 100%;
    height: auto;
    max-height: 500px; /* Limit height for large images */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    min-width: 200px; /* Ensure images are not too small */
    min-height: 200px;
}

.page-blog__full-article p {
    font-size: 1em;
    color: #444444;
    margin-bottom: 15px;
}

.page-blog__full-article p:last-child {
    margin-bottom: 0;
}

.page-blog__full-article a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.page-blog__full-article a:hover {
    text-decoration: underline;
}


/* Call to Action Section */
.page-blog__cta-section {
    background-color: #007bff; /* Primary brand color */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.page-blog__cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.page-blog__cta-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-blog__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.page-blog__cta-button {
    display: inline-block;
    background-color: #dc3545; /* Secondary brand color for button */
    color: #ffffff;
    padding: 18px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__cta-button:hover {
    background-color: #c82333;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-blog__hero-title {
        font-size: 2.2em;
    }
    .page-blog__hero-description {
        font-size: 1.1em;
    }
    .page-blog__section-title,
    .page-blog__detailed-section-title,
    .page-blog__cta-title {
        font-size: 2em;
    }
    .page-blog__article-title {
        font-size: 1.3em;
    }
    .page-blog__full-article-title {
        font-size: 1.6em;
    }
}

@media (max-width: 768px) {
    .page-blog {
        padding-top: var(--header-offset, 80px); /* Adjust for smaller header on mobile */
    }
    .page-blog__hero-section {
        padding: 60px 15px;
    }
    .page-blog__hero-title {
        font-size: 1.8em;
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__hero-button {
        padding: 12px 25px;
        font-size: 1em;
    }

    .page-blog__articles-section,
    .page-blog__detailed-articles,
    .page-blog__cta-section {
        padding: 40px 15px;
    }

    .page-blog__section-title,
    .page-blog__detailed-section-title,
    .page-blog__cta-title {
        font-size: 1.8em;
    }
    .page-blog__section-subtitle {
        font-size: 0.95em;
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }

    .page-blog__article-image {
        height: 200px; /* Smaller card image height */
    }

    .page-blog__article-content {
        padding: 20px;
    }

    .page-blog__article-title {
        font-size: 1.2em;
    }

    .page-blog__article-excerpt {
        font-size: 0.9em;
    }

    .page-blog__read-more-button {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    .page-blog__full-article {
        padding: 25px;
    }

    .page-blog__full-article-title {
        font-size: 1.4em;
    }

    .page-blog__full-article-image {
        max-height: 300px;
        min-width: 200px; /* Ensure images are not too small */
        min-height: 200px;
        max-width: 100%; /* Ensure content images don't overflow */
        height: auto;
    }
    .page-blog__full-article p {
        font-size: 0.95em;
    }

    .page-blog__cta-title {
        font-size: 2em;
    }
    .page-blog__cta-description {
        font-size: 1em;
    }
    .page-blog__cta-button {
        padding: 15px 30px;
        font-size: 1.1em;
    }
    /* Ensure all content images within .page-blog are responsive and don't overflow */
    .page-blog img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-title {
        font-size: 1.5em;
    }
    .page-blog__hero-description {
        font-size: 0.9em;
    }
    .page-blog__section-title,
    .page-blog__detailed-section-title,
    .page-blog__cta-title {
        font-size: 1.5em;
    }
    .page-blog__cta-description {
        font-size: 0.9em;
    }
}

/* Ensure content area images are never smaller than 200px and don't use filter */
.page-blog img {
    min-width: 200px;
    min-height: 200px;
    filter: none !important; /* Strictly forbid any filter effects */
}
/* Specifically for card images and full article images, ensure display width/height are set appropriately for layout */
.page-blog__article-image {
    width: 100%; /* Occupy full card width */
    height: 250px; /* Fixed height for consistency, will be object-fit: cover */
    object-fit: cover;
}
.page-blog__full-article-image {
    width: 100%; /* Occupy full article width */
    height: auto; /* Maintain aspect ratio */
    max-height: 500px; /* Cap max height */
    object-fit: cover;
}