/* style/blog.css */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--secondary-color, #FFFFFF); /* Assuming body background is light */
}

.page-blog__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 16px;
    box-sizing: border-box;
}

/* HERO Section */
.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 60px;
    background-color: #f8f8f8; /* Light background for the hero section */
}

.page-blog__hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

.page-blog__hero-image {
    flex: 1 1 40%;
    min-width: 300px;
    text-align: center;
}

.page-blog__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    color: #333333; /* Dark text for light background */
}

.page-blog__main-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem); /* H1 font size with clamp */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #017439; /* Brand primary color for H1 */
    max-width: 600px;
}

.page-blog__intro-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background-color: #017439; /* Primary brand color */
    color: #FFFFFF;
    border: 2px solid #017439;
}

.page-blog__btn-primary:hover {
    background-color: #005f2c;
    border-color: #005f2c;
}

.page-blog__btn-secondary {
    background-color: #FFFFFF;
    color: #017439;
    border: 2px solid #017439;
}

.page-blog__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005f2c;
    border-color: #005f2c;
}

.page-blog__hero-side-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    display: block; /* Ensure it behaves as a block element for max-width */
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: #FFFFFF;
}

.page-blog__section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
}

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

.page-blog__blog-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-blog__blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-blog__blog-card-media {
    width: 100%;
    height: 220px; /* Fixed height for consistent card image display */
    overflow: hidden;
}

.page-blog__blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.page-blog__blog-card:hover .page-blog__blog-card-image {
    transform: scale(1.05);
}

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

.page-blog__blog-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #017439;
    line-height: 1.4;
}

.page-blog__blog-card-meta {
    font-size: 0.9rem;
    color: #777777;
    margin-bottom: 15px;
}

.page-blog__blog-card-description {
    font-size: 1rem;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allows description to take available space */
}

.page-blog__blog-card-read-more {
    display: inline-block;
    color: #017439;
    font-weight: 600;
    text-decoration: none;
}

.page-blog__blog-card-read-more:hover {
    text-decoration: underline;
}

.page-blog__view-all-posts-container {
    text-align: center;
    margin-top: 50px;
}

/* Categories Section */
.page-blog__categories-section {
    padding-top: 60px;
    padding-bottom: 80px;
    background-color: #f8f8f8;
}

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

.page-blog__category-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

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

.page-blog__category-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #017439;
}

.page-blog__category-description {
    font-size: 0.95rem;
    color: #555555;
}

/* General image responsive styles */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block; /* Ensure it behaves as a block element for max-width */
}

/* Module 1: Three-column circular image (even if not used in HTML for this page) */
.page-blog__icon-box-media {
    width: 240px;
    height: 240px;
    aspect-ratio: 1/1;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f0f0f0; /* Placeholder background */
}

.page-blog__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Mobile Responsive Styles (max-width: 768px) */
@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* HERO Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding */
        padding-bottom: 40px;
    }

    .page-blog__hero-container {
        flex-direction: column;
        gap: 30px;
        padding: 30px 15px;
    }

    .page-blog__hero-image,
    .page-blog__hero-content {
        flex: 1 1 100%;
        min-width: auto;
    }

    .page-blog__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        text-align: center;
        max-width: 100%;
    }

    .page-blog__intro-text {
        font-size: 1rem;
        text-align: center;
        max-width: 100%;
    }

    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100%; /* Ensure container takes full width */
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__hero-side-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Latest Posts Section */
    .page-blog__latest-posts-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .page-blog__section-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
        margin-bottom: 30px;
    }

    .page-blog__post-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-blog__blog-card-media {
        height: 180px; /* Adjust height for mobile */
    }

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

    .page-blog__categories-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-blog__category-card {
        padding: 25px;
        min-height: 150px;
    }

    /* General image and container responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .page-blog__section,
    .page-blog__card,
    .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Module 1: Three-column circular image (even if not used in HTML for this page) */
    .page-blog__icon-box-media {
        width: 200px !important;
        height: 200px !important;
        aspect-ratio: 1/1 !important;
        margin-left: auto;
        margin-right: auto;
    }
    .page-blog__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Seven Tab Game Section (not used on this page, but included as per checklist) */
    .page-blog__game-tabs {
        /* No specific styles needed as this module is not present on Blog page */
    }
    .page-blog__tab-nav {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .page-blog__tab-nav button {
        width: 100%;
        text-align: center;
    }
    .page-blog__game-panel {
        padding: 15px 0;
    }
}