/* style/blog.css */

/* Base styles for the blog page content */
.page-blog {
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background-color: #FFFFFF; /* White background as per color scheme */
    color: #333333; /* Dark text for light background, ensuring WCAG AA contrast */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    text-align: center;
    padding: 80px 20px 40px; /* Adjust padding for visual balance */
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 40px; /* Space between text and image */
}

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

.page-blog__hero-title {
    font-size: 3.5em;
    color: #000000; /* Main color for important titles */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

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

.page-blog__hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

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

.page-blog__cta-button--register {
    background-color: #FCBC45; /* Login color for primary action */
    color: #000000;
    border: 2px solid #FCBC45;
}

.page-blog__cta-button--register:hover {
    background-color: #e0a53b;
    border-color: #e0a53b;
}

.page-blog__cta-button--promo {
    background-color: #000000; /* Main color for secondary action */
    color: #FFFFFF; /* Register color */
    border: 2px solid #000000;
}

.page-blog__cta-button--promo:hover {
    background-color: #333333;
    border-color: #333333;
}

/* General Section Styles */
.page-blog__section-title {
    font-size: 2.5em;
    color: #000000;
    text-align: center;
    margin-top: 60px;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-blog__section-intro {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px;
}

.page-blog__paragraph {
    font-size: 1.05em;
    color: #333333;
    margin-bottom: 20px;
    text-align: justify;
}

/* Introduction Section */
.page-blog__introduction-section {
    padding: 40px 0;
}

/* Featured Posts Grid */
.page-blog__featured-posts {
    padding: 60px 0;
}

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

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

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

.page-blog__post-thumbnail {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-blog__post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-blog__post-title {
    font-size: 1.5em;
    color: #000000;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-blog__post-title a {
    text-decoration: none;
    color: #000000;
    transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
    color: #FCBC45;
}

.page-blog__post-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more-link {
    display: inline-block;
    color: #FCBC45;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto; /* Pushes link to the bottom */
}

.page-blog__read-more-link:hover {
    text-decoration: underline;
}

/* Latest Updates Section */
.page-blog__latest-updates {
    padding: 60px 0;
    background-color: #f0f0f0; /* Slightly different background for visual separation */
}

.page-blog__article-list {
    display: grid;
    gap: 25px;
}

.page-blog__list-item {
    background-color: #FFFFFF;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.page-blog__list-title {
    font-size: 1.4em;
    color: #000000;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-blog__list-title a {
    text-decoration: none;
    color: #000000;
    transition: color 0.3s ease;
}

.page-blog__list-title a:hover {
    color: #FCBC45;
}

.page-blog__list-meta {
    font-size: 0.85em;
    color: #777777;
    margin-bottom: 15px;
}

.page-blog__list-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 15px;
}

/* Why Read Section */
.page-blog__why-read-section {
    padding: 60px 0;
}

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
}

.page-blog__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.page-blog__category-card {
    background-color: #FCBC45; /* Accent color for categories */
    color: #000000;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__category-card:hover {
    background-color: #e0a53b;
    transform: translateY(-5px);
}

.page-blog__category-title {
    font-size: 1.6em;
    margin-bottom: 10px;
    font-weight: bold;
    color: #000000; /* Ensure title color is dark on accent background */
}

.page-blog__category-description {
    font-size: 0.9em;
    color: #333333;
}

/* Call to Action Section */
.page-blog__cta-section {
    background-color: #000000; /* Dark background for CTA */
    color: #FFFFFF;
    padding: 80px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px; /* Space between content and image */
}

.page-blog__cta-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-blog__cta-title {
    font-size: 3em;
    color: #FFFFFF;
    margin-bottom: 20px;
    font-weight: bold;
}

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

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

.page-blog__cta-button--primary {
    background-color: #FCBC45;
    color: #000000;
    border: 2px solid #FCBC45;
}

.page-blog__cta-button--primary:hover {
    background-color: #e0a53b;
    border-color: #e0a53b;
}

.page-blog__cta-button--secondary {
    background-color: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
}

.page-blog__cta-button--secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FCBC45;
    border-color: #FCBC45;
}

.page-blog__cta-image {
    width: 800px; /* Specific width for CTA image */
    height: 600px; /* Specific height for CTA image */
    max-width: 100%; /* Ensure responsiveness */
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}


/* Newsletter Section */
.page-blog__newsletter-section {
    padding: 60px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.page-blog__newsletter-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-blog__newsletter-input {
    padding: 15px 20px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 1em;
    width: 300px;
    max-width: 100%;
}

.page-blog__newsletter-input::placeholder {
    color: #888888;
}

.page-blog__newsletter-button {
    background-color: #FCBC45;
    color: #000000;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.page-blog__newsletter-button:hover {
    background-color: #e0a53b;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 3em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__cta-title {
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding-top: var(--header-offset, 120px); /* Ensure mobile header offset */
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__hero-title {
        font-size: 2.5em;
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__cta-button {
        width: 100%;
        max-width: 300px;
    }

    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__section-intro {
        font-size: 1em;
    }
    .page-blog__paragraph {
        font-size: 0.95em;
    }

    .page-blog__posts-grid,
    .page-blog__categories-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__post-thumbnail {
        height: 200px;
    }

    .page-blog__cta-title {
        font-size: 2em;
    }
    .page-blog__cta-description {
        font-size: 1em;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__cta-image {
        width: 100%;
        height: auto; /* Ensure image scales correctly */
    }

    .page-blog__newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    .page-blog__newsletter-input {
        width: 100%;
        max-width: 300px;
    }

    /* Content area images must not cause overflow */
    .page-blog img {
        max-width: 100%;
        height: auto;
    }
}

/* Ensure no images below 200px in content area */
.page-blog img:not(.shared-header__logo):not(.shared-footer__payment-icon):not(.shared-footer__social-icon) {
    min-width: 200px;
    min-height: 200px;
}

/* Specific override for images within cards to ensure they are not too small */
.page-blog__post-thumbnail {
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-blog__cta-image {
    min-width: 200px;
    min-height: 200px;
}

/* Ensure no CSS filter is used on images */
.page-blog img {
    filter: none; /* Explicitly remove any potential filters */
}