/* style/blog.css */

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

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

/* Hero Section */
.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 40px;
    background-color: #f8f8f8; /* Light background for hero section */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px; /* Space between image and content */
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

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

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

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

.page-blog__btn-primary {
    display: inline-block;
    background-color: #26A9E0; /* Brand primary color */
    color: #FFFFFF;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: 2px solid #26A9E0;
    max-width: 100%; /* Button responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

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

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

.page-blog__section-subtitle--white {
    color: #f0f0f0;
}

/* Latest Posts Section */
.page-blog__latest-posts-section,
.page-blog__featured-articles-section,
.page-blog__categories-section,
.page-blog__about-section {
    padding: 60px 0;
}

.page-blog__dark-bg {
    background-color: #26A9E0; /* Brand primary color for dark background */
    color: #FFFFFF;
}

.page-blog__blog-grid,
.page-blog__featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.page-blog__blog-card,
.page-blog__featured-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;
}

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

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

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

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

.page-blog__card-title {
    font-size: 1.4em;
    color: #26A9E0;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.page-blog__card-title:hover {
    text-decoration: underline;
}

.page-blog__card-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 15px;
}

.page-blog__card-date {
    font-size: 0.85em;
    color: #888888;
    display: block;
}

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

.page-blog__btn-secondary {
    display: inline-block;
    background-color: #FFFFFF;
    color: #26A9E0;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid #26A9E0;
    max-width: 100%; /* Button responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-secondary:hover {
    background-color: #26A9E0;
    color: #FFFFFF;
}

/* Categories Section */
.page-blog__categories-section {
    background-color: #f0f8ff; /* Light blue tint background */
}

.page-blog__category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 8px 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-blog__category-item:hover {
    background-color: #26A9E0;
    border-color: #26A9E0;
}

.page-blog__category-link {
    text-decoration: none;
    color: #26A9E0;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.3s ease;
}

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

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Brand primary color */
    text-align: center;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    width: 100%; /* Container responsive */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* About Section */
.page-blog__about-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.05em;
    color: #444444;
}

.page-blog__about-content p {
    margin-bottom: 15px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__blog-grid,
    .page-blog__featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .page-blog__card-image {
        height: 180px;
    }

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

    .page-blog__section-subtitle {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    /* General responsive */
    .page-blog__container {
        padding: 0 15px;
    }

    /* Hero Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Fixed header offset handled by body, small top padding */
        padding-bottom: 30px;
    }

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

    .page-blog__main-title {
        font-size: 2em;
    }

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

    /* Latest Posts & Featured Articles */
    .page-blog__latest-posts-section,
    .page-blog__featured-articles-section,
    .page-blog__categories-section,
    .page-blog__about-section {
        padding: 40px 0;
    }

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

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

    .page-blog__blog-grid,
    .page-blog__featured-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
        gap: 20px;
    }

    .page-blog__blog-card,
    .page-blog__featured-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .page-blog__card-image {
        height: 150px; /* Adjust height for smaller screens */
        max-width: 100% !important; /* Enforce responsive image */
        width: 100% !important;
        height: auto !important;
    }

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

    .page-blog__card-excerpt {
        font-size: 0.9em;
    }

    /* Categories Section */
    .page-blog__category-list {
        gap: 10px;
    }

    .page-blog__category-item {
        padding: 6px 15px;
    }

    .page-blog__category-link {
        font-size: 0.9em;
    }

    /* CTA Section */
    .page-blog__cta-section {
        padding: 60px 0;
    }

    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .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; /* Ensure padding for full-width buttons */
        padding-right: 15px;
    }

    /* About Section */
    .page-blog__about-content {
        font-size: 1em;
    }

    /* Generic image responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* Generic container responsive */
    .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;
    }
}

@media (max-width: 480px) {
    .page-blog__blog-grid,
    .page-blog__featured-grid {
        grid-template-columns: 1fr; /* Single column for mobile phones */
    }

    .page-blog__card-image {
        height: 180px; /* Adjust height for smaller screens */
    }

    .page-blog__category-list {
        flex-direction: column;
        align-items: center;
    }

    .page-blog__category-item {
        width: 100%;
        text-align: center;
    }
}