/* style/blog.css */

/* Base styling for the blog page */
.page-blog {
    color: #333333; /* Dark text for light body background #f4f4f4 */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px); /* Fixed header offset for PC and mobile */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    overflow: hidden;
    background-color: #8B0000; /* Dark red background for hero section */
    color: #ffffff; /* White text for dark background */
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin-bottom: 40px;
}

.page-blog__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #FFD700; /* Gold color for main title */
    line-height: 1.2;
    font-weight: bold;
}

.page-blog__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-blog__hero-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.page-blog__hero-button--primary {
    background-color: #FFD700; /* Gold primary button */
    color: #8B0000; /* Dark red text for gold button */
    border: 2px solid #FFD700;
}

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

.page-blog__hero-button--secondary {
    background-color: transparent;
    color: #FFD700; /* Gold text for secondary button */
    border: 2px solid #FFD700;
}

.page-blog__hero-button--secondary:hover {
    background-color: #FFD700;
    color: #8B0000;
    transform: translateY(-2px);
}

.page-blog__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.page-blog__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the entire area */
    opacity: 0.2; /* Subtle overlay */
    display: block;
}

/* Articles Section */
.page-blog__articles-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

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

.page-blog__articles-heading {
    font-size: 2.5em;
    color: #8B0000; /* Dark red heading */
    margin-bottom: 15px;
}

.page-blog__articles-subheading {
    font-size: 1.1em;
    color: #555555;
    max-width: 700px;
    margin: 0 auto;
}

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

.page-blog__article-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-blog__article-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency, ensures minimum 200px */
    object-fit: cover;
    display: block;
}

.page-blog__article-title {
    font-size: 1.5em;
    color: #8B0000; /* Dark red title */
    padding: 15px 20px 10px;
    margin: 0;
}

.page-blog__article-excerpt {
    font-size: 0.95em;
    color: #555555;
    padding: 0 20px 15px;
}

.page-blog__article-read-more {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 20px 20px;
    background-color: #FFD700; /* Gold button */
    color: #8B0000; /* Dark red text */
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-blog__article-read-more:hover {
    background-color: #e6c200;
}

/* Call to Action Section */
.page-blog__cta-section {
    background-color: #FFD700; /* Gold background for CTA */
    color: #8B0000; /* Dark red text for gold background */
    padding: 60px 20px;
    text-align: center;
    margin-top: 60px;
}

.page-blog__cta-heading {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #8B0000; /* Dark red heading */
    line-height: 1.2;
}

.page-blog__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.page-blog__cta-button--primary {
    background-color: #8B0000; /* Dark red primary button */
    color: #FFD700; /* Gold text */
    border: 2px solid #8B0000;
}

.page-blog__cta-button--primary:hover {
    background-color: #a30000;
    transform: translateY(-2px);
}

.page-blog__cta-button--secondary {
    background-color: transparent;
    color: #8B0000; /* Dark red text */
    border: 2px solid #8B0000;
}

.page-blog__cta-button--secondary:hover {
    background-color: #8B0000;
    color: #FFD700;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 2.8em;
    }
    .page-blog__articles-heading {
        font-size: 2em;
    }
    .page-blog__cta-heading {
        font-size: 2.4em;
    }
}

@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: 2.2em;
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__hero-actions {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__hero-button {
        width: 100%;
        max-width: 300px;
    }

    .page-blog__articles-section {
        margin: 20px auto;
        padding: 15px;
    }
    .page-blog__articles-heading {
        font-size: 1.8em;
    }
    .page-blog__articles-subheading {
        font-size: 0.95em;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__article-card {
        margin-bottom: 20px;
    }

    .page-blog__cta-section {
        padding: 40px 15px;
        margin-top: 40px;
    }
    .page-blog__cta-heading {
        font-size: 2em;
    }
    .page-blog__cta-description {
        font-size: 1em;
    }
    .page-blog__cta-actions {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__cta-button {
        width: 100%;
        max-width: 300px;
    }

    /* Crucial: Ensure content images are responsive and don't overflow */
    .page-blog img {
        max-width: 100%;
        height: auto;
    }
}

/* Ensure no image filters are applied */
.page-blog img {
    filter: none !important;
}

/* Content area images must be at least 200px. The article card images are 225px height, */
/* and will scale responsively with max-width: 100%; height: auto; on mobile. */
/* The hero image is object-fit: cover, and its container ensures it's large. */
.page-blog__article-image {
    min-width: 200px; /* Enforce minimum width if possible, though max-width: 100% will dominate */
    min-height: 200px; /* Enforce minimum height */
}