/* style/blog.css */
/* Base styles for the blog page, assuming a light body background from shared.css */
.page-blog {
    font-family: 'Arial', sans-serif;
    color: #1F2D3D; /* Text Main */
    background-color: #F4F7FB; /* Background */
    line-height: 1.6;
    font-size: 1rem;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Enforce image on top, text below */
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: #F4F7FB; /* Background */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-blog__hero-content {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    background-color: #FFFFFF; /* Card BG, light background */
    box-sizing: border-box;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

.page-blog__description {
    font-size: 1.15rem;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%; /* Ensure button adapts to container */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button color */
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
    box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

.page-blog__btn-secondary {
    background-color: #ffffff;
    color: #2F6BFF; /* Main color */
    border: 2px solid #2F6BFF; /* Border color */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
    background-color: #F4F7FB; /* Background */
    color: #2F6BFF;
    border-color: #4A8BFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Section Titles & Intros */
.page-blog__section-title {
    font-size: 2.2rem;
    color: #1F2D3D; /* Text Main */
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-blog__section-intro {
    font-size: 1.1rem;
    color: #1F2D3D; /* Text Main */
    text-align: center;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.page-blog__blog-card {
    background-color: #FFFFFF; /* Card BG */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-blog__card-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

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

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

.page-blog__card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1; /* Allow title to take available space */
}

.page-blog__card-title a {
    color: #1F2D3D; /* Text Main */
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-blog__card-meta {
    font-size: 0.9rem;
    color: #666666; /* Slightly lighter text for meta info */
    margin-bottom: 15px;
}

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

.page-blog__read-more {
    color: #2F6BFF; /* Main color */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
    text-decoration: underline;
}

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

/* Featured Guides Section (Dark Background) */
.page-blog__featured-guides {
    padding: 60px 0;
    background-color: #2F6BFF; /* Main color, used as dark background */
    color: #ffffff; /* White text for contrast */
}

.page-blog__featured-guides .page-blog__section-title,
.page-blog__featured-guides .page-blog__section-intro {
    color: #ffffff;
}

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

.page-blog__guide-card {
    background-color: #FFFFFF; /* Card BG */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__card-icon-wrapper {
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.page-blog__card-icon {
    width: 100px; /* Display size */
    height: 100px; /* Display size */
    min-width: unset; /* Override min-width for icons, as per specific instruction */
    min-height: unset; /* Override min-height for icons, as per specific instruction */
    object-fit: contain;
    display: block;
}

.page-blog__guide-card .page-blog__card-title a {
    color: #1F2D3D; /* Text Main */
}

.page-blog__guide-card .page-blog__card-title a:hover {
    color: #2F6BFF; /* Main color */
}

.page-blog__guide-card .page-blog__card-excerpt {
    color: #1F2D3D; /* Text Main */
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #F4F7FB; /* Background */
}

.page-blog__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-blog__faq-item {
    background-color: #FFFFFF; /* Card BG */
    border: 1px solid #D6E2FF; /* Border color */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1F2D3D; /* Text Main */
    cursor: pointer;
    background-color: #FFFFFF; /* Card BG */
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for Chrome/Safari */
}

.page-blog__faq-item summary {
    list-style: none; /* Hide default marker for Firefox */
}

.page-blog__faq-question:hover {
    background-color: #F4F7FB; /* Background */
}

.page-blog__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: #2F6BFF; /* Main color */
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: #1F2D3D; /* Text Main */
    line-height: 1.6;
}

/* Final CTA Section (Dark Background) */
.page-blog__cta-final {
    padding: 60px 0;
    background-color: #2F6BFF; /* Main color, used as dark background */
    color: #ffffff; /* White text for contrast */
    text-align: center;
}

.page-blog__cta-final .page-blog__section-title,
.page-blog__cta-final .page-blog__description {
    color: #ffffff;
}

.page-blog__cta-final .page-blog__btn-primary {
    margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    }
    .page-blog__section-title {
        font-size: 2rem;
    }
}

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

    .page-blog__hero-section {
        padding: 40px 0 20px;
        padding-top: 10px !important; /* body handles header offset, small top padding */
    }

    .page-blog__hero-content {
        padding: 30px 15px;
        margin-top: 15px;
    }

    .page-blog__main-title {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

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

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

    .page-blog__section-intro {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .page-blog__latest-posts,
    .page-blog__featured-guides,
    .page-blog__faq-section,
    .page-blog__cta-final {
        padding: 40px 0;
    }

    .page-blog__post-grid,
    .page-blog__guide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-blog__blog-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

    .page-blog__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }

    .page-blog__faq-answer {
        padding: 0 20px 15px;
    }

    /* Buttons responsive */
    .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;
        margin-bottom: 10px; /* Space between stacked buttons */
    }

    /* Button groups */
    .page-blog__cta-wrapper,
    .page-blog__view-all-wrapper {
        display: flex;
        flex-direction: column; /* Stack buttons vertically */
        align-items: center;
        gap: 10px; /* Space between buttons */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
}

/* Ensure all images are responsive by default */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure content area images are not too small */
/* This rule applies to generated image content, not small icons */
.page-blog__content-area img,
.page-blog__latest-posts img,
.page-blog__featured-guides img {
    min-width: 200px;
    min-height: 200px;
}

/* Specific override for icons to allow smaller display while still being >=200px gen size */
.page-blog__card-icon {
    width: 100px; /* Display size */
    height: 100px; /* Display size */
    min-width: unset; /* Override min-width for icons, as per specific instruction */
    min-height: unset; /* Override min-height for icons, as per specific instruction */
    object-fit: contain;
}

/* Color contrast enforcement */
.page-blog__light-bg {
    background-color: #FFFFFF;
    color: #1F2D3D;
}

.page-blog__dark-section {
    background-color: #2F6BFF;
    color: #FFFFFF;
}

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