/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #1F2D3D; /* Text Main */
    background: #F4F7FB; /* Background */
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding as per rule */
    background-color: #F4F7FB; /* Ensure it contrasts with text */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Max width for the image */
    margin-bottom: 30px;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    filter: none; /* No CSS filters on images */
}

.page-blog__hero-content {
    max-width: 800px;
    margin-top: 20px;
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: bold;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__description {
    font-size: 1.1rem;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 30px;
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-blog__cta-button:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

/* Latest Posts Section */
.page-blog__latest-posts {
    padding: 60px 0;
    background: #F4F7FB; /* Background */
    color: #1F2D3D; /* Text Main */
}

.page-blog__section-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: #1F2D3D; /* Text Main */
    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__post-card {
    background: #FFFFFF; /* Card BG */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid #D6E2FF; /* Border */
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
}

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

.page-blog__post-thumbnail {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    display: block;
    object-fit: cover;
    filter: none; /* No CSS filters on images */
}

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

.page-blog__post-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #000000; /* Custom Color_1776249996415 */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__post-title:hover {
    color: #2F6BFF; /* Main color on hover */
}

.page-blog__post-excerpt {
    font-size: 1rem;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 15px;
}

.page-blog__post-date {
    font-size: 0.9rem;
    color: #666;
}

.page-blog__view-all-button-wrapper {
    text-align: center;
    margin-top: 40px;
}

.page-blog__view-all-button {
    display: inline-block;
    padding: 12px 25px;
    background: #2F6BFF; /* Main color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-blog__view-all-button:hover {
    background: #1e5ddb;
}

/* Categories Section */
.page-blog__categories {
    padding: 60px 0;
    background: #2F6BFF; /* Main color for dark section */
    color: #ffffff;
    text-align: center;
}

.page-blog__section-title--white {
    color: #ffffff;
}

.page-blog__description--white {
    color: #f0f0f0;
    margin-bottom: 40px;
}

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

.page-blog__category-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 25px 15px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-blog__category-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.page-blog__category-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-blog__category-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 60px 0;
    background: #F4F7FB; /* Background */
    text-align: center;
    color: #1F2D3D; /* Text Main */
}

.page-blog__cta-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.page-blog__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    background: #ffffff;
    color: #2F6BFF; /* Main color */
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease;
    border: 2px solid #2F6BFF; /* Border */
    cursor: pointer;
}

.page-blog__btn-secondary:hover {
    background: #2F6BFF;
    color: #ffffff;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .page-blog__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-blog__section-title {
        font-size: 1.8rem;
    }
    .page-blog__post-thumbnail {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section,
    .page-blog__latest-posts,
    .page-blog__categories,
    .page-blog__cta-section {
        padding: 40px 0;
        padding-top: 10px !important; /* Specific for sections, body handles overall */
    }

    .page-blog__container {
        padding: 0 15px; /* Add padding for smaller screens */
    }

    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }

    .page-blog__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .page-blog__description {
        font-size: 1rem;
    }

    .page-blog__section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

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

    .page-blog__post-thumbnail {
        height: 200px; /* Ensure minimum size */
    }

    .page-blog__post-title {
        font-size: 1.2rem;
    }

    .page-blog__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    /* --- Mobile Responsive Images (CRITICAL) --- */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .page-blog__hero-image-wrapper,
    .page-blog__post-card,
    .page-blog__category-card,
    .page-blog__post-thumbnail {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* --- Mobile Responsive Buttons (CRITICAL) --- */
    .page-blog__cta-button,
    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog__view-all-button,
    .page-blog a[class*="button"],
    .page-blog a[class*="btn"] {
        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__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
}

/* Ensure minimum image sizes are respected by CSS */
.page-blog__post-thumbnail {
    min-width: 200px;
    min-height: 200px;
}
.page-blog__hero-image {
    min-width: 200px;
    min-height: 200px;
}
/* Any other image that might fall below 200px */
.page-blog img:not(.page-blog__category-icon) {
    min-width: 200px;
    min-height: 200px;
}

/* Color Contrast Enforcement */
.page-blog__light-bg {
    background: #F4F7FB; /* Background */
    color: #1F2D3D; /* Text Main */
}

.page-blog__dark-section {
    background: #2F6BFF; /* Main color */
    color: #ffffff;
}

.page-blog__post-card {
    background: #FFFFFF; /* Card BG */
    color: #1F2D3D; /* Text Main */
}

.page-blog__post-title {
    color: #000000; /* Custom Color_1776249996415 */
}

.page-blog__cta-button,
.page-blog__btn-primary {
    color: #ffffff; /* White text on dark button */
}

.page-blog__btn-secondary {
    color: #2F6BFF; /* Main color text on white button */
}

/* No CSS filters on images */
.page-blog img {
    filter: none;
}