/* style/blog.css */

.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Default body background */
}

.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 hero */
}

.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-content {
    flex: 1 1 50%;
    min-width: 300px;
}

.page-blog__main-title {
    font-size: 2.8em;
    font-weight: 700;
    line-height: 1.2;
    color: #26A9E0; /* Primary color for H1 */
    margin-bottom: 20px;
}

.page-blog__description {
    font-size: 1.1em;
    color: #555555;
    margin-bottom: 30px;
}

.page-blog__cta-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Ensure buttons wrap 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: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    max-width: 100%; /* Button responsive rule */
    box-sizing: border-box; /* Button responsive rule */
    white-space: normal; /* Button responsive rule */
    word-wrap: break-word; /* Button responsive rule */
}

.page-blog__btn-primary {
    background-color: #26A9E0;
    color: #FFFFFF;
    border: 2px solid #26A9E0;
}

.page-blog__btn-primary:hover {
    background-color: #1e87b3;
    border-color: #1e87b3;
}

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

.page-blog__btn-secondary:hover {
    background-color: #e0f2f7;
}

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

.page-blog__hero-side-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* --- Section Titles & Descriptions --- */
.page-blog__section-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 15px;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.page-blog__post-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    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;
}

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

.page-blog__post-thumbnail {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
}

.page-blog__post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    min-width: 200px;
    min-height: 200px;
}

.page-blog__post-card:hover .page-blog__post-thumbnail img {
    transform: scale(1.05);
}

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__post-title a {
    color: #26A9E0; /* Primary color for blog titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-blog__post-meta {
    font-size: 0.9em;
    color: #888888;
    margin-bottom: 15px;
}

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

.page-blog__read-more-btn {
    display: inline-block;
    background-color: #26A9E0;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-blog__read-more-btn:hover {
    background-color: #1e87b3;
}

/* --- Pagination --- */
.page-blog__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

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

.page-blog__pagination-link:hover:not(.is-active) {
    background-color: #e0f2f7;
}

.page-blog__pagination-link.is-active {
    background-color: #26A9E0;
    color: #FFFFFF;
    border-color: #26A9E0;
    cursor: default;
}

/* --- Call to Action Section --- */
.page-blog__call-to-action-section {
    padding: 80px 0;
    text-align: center;
}

.page-blog__dark-bg {
    background-color: #26A9E0; /* Primary color as background */
    color: #FFFFFF; /* White text on dark background */
}

.page-blog__call-to-action-section .page-blog__section-title {
    color: #FFFFFF; /* White title on dark background */
    margin-bottom: 20px;
}

.page-blog__call-to-action-section .page-blog__section-description {
    color: #e0f2f7; /* Lighter white text for description */
    margin-bottom: 40px;
}

.page-blog__call-to-action-section .page-blog__cta-group {
    justify-content: center;
}

.page-blog__call-to-action-section .page-blog__btn-primary {
    background-color: #FFFFFF;
    color: #26A9E0;
    border-color: #FFFFFF;
}

.page-blog__call-to-action-section .page-blog__btn-primary:hover {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
}

.page-blog__call-to-action-section .page-blog__btn-secondary {
    background-color: transparent;
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.page-blog__call-to-action-section .page-blog__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Ensure all images adhere to min-size requirements */
.page-blog img {
    min-width: 200px;
    min-height: 200px;
}

/* --- Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
    .page-blog__container {
        padding: 15px;
        max-width: 100% !important;
        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;
        text-align: center;
        padding: 20px 15px;
        gap: 20px;
    }

    .page-blog__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-blog__description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-blog__cta-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100%;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .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__hero-image {
        width: 100%;
    }

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

    /* Section Titles & Descriptions */
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    .page-blog__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

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

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

    .page-blog__post-thumbnail {
        height: 180px; /* Adjust height for mobile */
    }

    .page-blog__post-thumbnail img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Allow height to adjust */
        object-fit: cover;
    }

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

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

    .page-blog__post-excerpt {
        font-size: 0.95em;
    }

    /* Pagination */
    .page-blog__pagination {
        margin-top: 30px;
        gap: 8px;
    }

    .page-blog__pagination-link {
        width: 36px;
        height: 36px;
        font-size: 0.9em;
    }

    /* Call to Action Section */
    .page-blog__call-to-action-section {
        padding: 50px 0;
    }

    .page-blog__call-to-action-section .page-blog__cta-group {
        flex-direction: column;
    }
}