/* style/blog.css */

/* Base styling for the blog page content */
.page-blog {
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    background-color: #000000; /* Dark background for brand scheme */
    color: #FFFFFF; /* Light text for contrast on dark background */
    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;
    overflow: hidden;
    color: #FFFFFF;
    text-align: center;
    padding: 80px 20px; /* Adjust padding for better visual balance */
    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; /* Slightly dim the background image for text readability */
}

.page-blog__hero-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.page-blog__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFFFF; /* Ensure title is white on dark overlay */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

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

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

/* General Button Styles */
.page-blog__button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    font-size: 1.1em;
}

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

.page-blog__button--register:hover {
    background-color: #F0F0F0;
    transform: translateY(-2px);
}

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

.page-blog__button--login:hover {
    background-color: #E0A83D;
    transform: translateY(-2px);
}

.page-blog__button--explore,
.page-blog__button--subscribe {
    background-color: #FCBC45;
    color: #000000;
    border: 2px solid #FCBC45;
}

.page-blog__button--explore:hover,
.page-blog__button--subscribe:hover {
    background-color: #E0A83D;
    transform: translateY(-2px);
}

/* Section Common Styles */
.page-blog__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #FFFFFF;
    font-weight: bold;
}

.page-blog__section-text {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #E0E0E0;
}

/* Introduction Section */
.page-blog__introduction-section {
    padding: 60px 0;
    background-color: #1a1a1a; /* Slightly lighter dark for contrast */
}

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

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

.page-blog__category-card {
    background-color: #1a1a1a; /* Card background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #FFFFFF;
}

.page-blog__category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

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

.page-blog__category-title {
    font-size: 1.5em;
    padding: 20px 20px 10px;
    color: #FCBC45; /* Highlight title */
}

.page-blog__category-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.page-blog__category-link:hover {
    color: #FFFFFF;
}

.page-blog__category-description {
    font-size: 0.95em;
    padding: 0 20px 20px;
    color: #E0E0E0;
    flex-grow: 1; /* Ensure description fills space */
}

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

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

.page-blog__article-card {
    background-color: #000000; /* Article card background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #FFFFFF;
}

.page-blog__article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

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

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

.page-blog__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #FCBC45;
}

.page-blog__article-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.page-blog__article-link:hover {
    color: #FFFFFF;
}

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

.page-blog__read-more {
    display: inline-block;
    color: #FCBC45;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #FFFFFF;
}

/* Call to Action Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: #000000;
    text-align: center;
}

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

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

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

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

.page-blog__newsletter-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.page-blog__newsletter-input {
    padding: 15px 20px;
    border: 2px solid #FCBC45;
    border-radius: 8px;
    background-color: #000000;
    color: #FFFFFF;
    font-size: 1.1em;
    width: 300px;
    max-width: 100%;
    outline: none;
    transition: border-color 0.3s ease;
}

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

.page-blog__newsletter-input:focus {
    border-color: #FFFFFF;
}

/* More Articles & Pagination */
.page-blog__more-articles-section {
    padding: 60px 0;
    background-color: #000000;
    text-align: center;
}

.page-blog__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-blog__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #1a1a1a;
    color: #FCBC45;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__pagination-link:hover {
    background-color: #FCBC45;
    color: #000000;
}

.page-blog__pagination-link--active {
    background-color: #FCBC45;
    color: #000000;
}

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

@media (max-width: 768px) {
    .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__button {
        width: 100%;
        max-width: 250px;
    }

    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__section-text {
        font-size: 0.95em;
    }

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

    .page-blog__cta-title {
        font-size: 2em;
    }
    .page-blog__cta-description {
        font-size: 1em;
    }
    .page-blog__cta-actions {
        flex-direction: column;
        gap: 15px;
    }

    .page-blog__newsletter-form {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .page-blog__newsletter-input {
        width: 100%;
        max-width: 300px;
    }
    /* Ensure content images are responsive and do not overflow */
    .page-blog img {
        max-width: 100%;
        height: auto;
        min-width: 200px; /* Enforce min size even in mobile */
        min-height: 200px; /* Enforce min size even in mobile */
    }
}

/* Image styling rules for content area */
/* This selector targets ALL img elements within .page-blog, ensuring they meet the minimum size and responsiveness. */
.page-blog img:not(.page-blog__hero-image) {
    min-width: 200px;
    min-height: 200px;
    /* Ensure no smaller dimensions are applied by other rules */
}

/* Specific image sizes for cards, etc. should be >= 200px and responsive */
.page-blog__category-image,
.page-blog__article-image {
    width: 100%; /* Will be constrained by parent grid column */
    height: 225px; /* Fixed height, but will be object-fit: cover */
    object-fit: cover;
    display: block;
    /* Explicitly ensuring min-width/height is handled by the general .page-blog img rule or by their containing layout */
}

/* No CSS filter allowed for images */
.page-blog img {
    filter: none !important; /* Explicitly deny any filter application */
}