/* style/blog.css */

/* Ensure main content starts below the fixed header */
.page-blog {
    color: #333333; /* Dark text for light body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px); /* Desktop padding to clear header */
}

/* Hero Section */
.page-blog__hero-section {
    background-color: #000000; /* Dark background for hero */
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-blog__hero-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2; /* Ensure content is above any background effects */
}

.page-blog__hero-title {
    font-size: 3.5em;
    color: #FCBC45; /* Login button color for emphasis */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.2em;
    color: #FFFFFF; /* Light text on dark background */
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    min-width: 180px;
    text-align: center;
}

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

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

.page-blog__button--secondary {
    background-color: #FFFFFF; /* Register button color */
    color: #000000;
    border: 2px solid #FFFFFF;
}

.page-blog__button--secondary:hover {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
}

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

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

/* Featured Articles */
.page-blog__featured-articles {
    background-color: #f8f8f8;
    padding: 60px 0;
}

.page-blog__article-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;
    display: flex;
    flex-direction: column;
}

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

.page-blog__article-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    filter: none; /* Ensure no filter is applied */
}

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

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

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

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

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

.page-blog__read-more {
    display: inline-block;
    color: #FCBC45;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
    color: #e0a53b;
    text-decoration: underline;
}

/* Latest Posts */
.page-blog__latest-posts {
    padding: 60px 0;
}

.page-blog__article-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.page-blog__list-item {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    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-image {
    width: 250px; /* Fixed width for desktop list item image */
    height: 180px; /* Fixed height */
    object-fit: cover;
    flex-shrink: 0;
    display: block;
    filter: none; /* Ensure no filter is applied */
}

.page-blog__list-content {
    padding: 20px 25px;
    flex-grow: 1;
}

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

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

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

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

/* Call to Action */
.page-blog__call-to-action {
    background-color: #000000;
    padding: 80px 20px;
    text-align: center;
    margin-top: 60px;
}

.page-blog__call-to-action-content {
    max-width: 800px;
}

.page-blog__call-to-action-title {
    font-size: 2.8em;
    color: #FCBC45;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-blog__call-to-action-description {
    font-size: 1.1em;
    color: #FFFFFF;
    margin-bottom: 40px;
}

.page-blog__button--cta {
    background-color: #FCBC45;
    color: #000000;
    border: 2px solid #FCBC45;
    padding: 18px 40px;
    font-size: 1.2em;
}

.page-blog__button--cta:hover {
    background-color: #e0a53b;
    border-color: #e0a53b;
}

/* Animation for JS */
.page-blog__article-card,
.page-blog__list-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.page-blog__article-card.page-blog--visible,
.page-blog__list-item.page-blog--visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .page-blog__section-title {
        font-size: 2.2em;
    }

    .page-blog__call-to-action-title {
        font-size: 2.4em;
    }
}

@media (max-width: 768px) {
    .page-blog {
        padding-top: var(--header-offset, 120px); /* Keep padding for mobile */
    }

    .page-blog__hero-section {
        padding: 60px 20px;
    }

    .page-blog__hero-title {
        font-size: 2.5em;
    }

    .page-blog__hero-description {
        font-size: 1em;
    }

    .page-blog__hero-actions {
        flex-direction: column;
        gap: 15px;
    }

    .page-blog__button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .page-blog__section-title {
        font-size: 2em;
        margin-top: 40px;
        margin-bottom: 30px;
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__article-image {
        height: 200px;
        min-width: 200px; /* Ensure minimum display size */
        min-height: 200px;
        max-width: 100%;
        height: auto;
    }

    .page-blog__list-item {
        flex-direction: column;
        text-align: center;
    }

    .page-blog__list-image {
        width: 100%;
        height: 200px;
        max-width: 100%; /* Ensure mobile image does not overflow */
        min-width: 200px; /* Ensure minimum display size */
        min-height: 200px;
        height: auto;
    }

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

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

    .page-blog__list-excerpt {
        font-size: 0.85em;
    }

    .page-blog__call-to-action {
        padding: 50px 20px;
        margin-top: 40px;
    }

    .page-blog__call-to-action-title {
        font-size: 2em;
    }

    .page-blog__call-to-action-description {
        font-size: 1em;
    }

    /* Ensure all images within .page-blog are responsive and not too small */
    .page-blog img {
        max-width: 100%;
        height: auto;
        min-width: 200px;
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-title {
        font-size: 2em;
    }
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__call-to-action-title {
        font-size: 1.8em;
    }
    .page-blog__button {
        padding: 12px 25px;
        font-size: 1em;
    }
}

/* Ensure content area images are never smaller than 200px (desktop) */
.page-blog__article-image,
.page-blog__list-image {
    min-width: 200px;
    min-height: 200px;
}

/* Ensure no filter is used for images */
.page-blog img {
    filter: none;
}