/* style/blog.css */

/* General styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Main text color, assuming light body background from shared.css */
    background-color: #F5F7FA; /* General background color */
}

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

.page-blog__section-title {
    font-size: 2.5em;
    color: #E53935; /* Main brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

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

/* Hero Section */
.page-blog__hero-section {
    background: linear-gradient(135deg, #FF5A4F 0%, #E53935 100%); /* Gradient background for hero */
    padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
    padding-bottom: 60px;
    color: #ffffff;
}

.page-blog__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-blog__hero-content {
    flex: 1;
    min-width: 300px; /* Ensure content doesn't get too small */
    text-align: left;
}

.page-blog__hero-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive H1 font size */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.page-blog__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-blog__hero-cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.page-blog__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

.page-blog__hero-image {
    flex: 1;
    min-width: 300px; /* Ensure image doesn't get too small */
    text-align: center;
}

.page-blog__hero-side-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Intro Section */
.page-blog__intro-section {
    padding: 60px 0;
    background-color: #FFFFFF; /* Card BG color */
}

/* Blog Posts Section */
.page-blog__posts-section {
    padding: 60px 0;
    background-color: #E53935; /* Dark background for this section */
    color: #ffffff;
}

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

.page-blog__post-card {
    background-color: #ffffff; /* Card BG color */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333; /* Text color for card content */
}

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

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

.page-blog__post-thumbnail {
    width: 100%;
    height: 220px; /* Fixed height for thumbnails */
    object-fit: cover;
    display: block;
}

.page-blog__post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100% - 220px); /* Adjust height based on thumbnail */
}

.page-blog__post-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #E53935; /* Brand color for post titles */
    line-height: 1.3;
}

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-blog__read-more {
    display: inline-block;
    color: #E53935;
    font-weight: bold;
    text-decoration: none;
}

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

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

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

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

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

.page-blog__faq-item summary {
    display: block; /* Ensures summary takes full width */
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: #333333;
    position: relative;
    list-style: none; /* Remove default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-blog__faq-qtext {
    flex-grow: 1;
    padding-right: 15px;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #E53935;
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate '+' to 'x' or just change to '-' */
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
}

/* Global Image responsiveness */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-blog__hero-container {
        flex-direction: column;
        text-align: center;
    }
    .page-blog__hero-content {
        text-align: center;
    }
    .page-blog__hero-cta-buttons {
        justify-content: center;
    }
    .page-blog__hero-image {
        order: -1; /* Image appears above content on smaller screens */
    }
    .page-blog__post-thumbnail {
        height: 180px; /* Adjust height for slightly smaller screens */
    }
}


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

    .page-blog__container {
        padding: 20px 15px !important; /* Smaller padding for mobile */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

    /* HERO Section Mobile */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Crucial for fixed header offset */
        padding-bottom: 30px;
    }

    .page-blog__hero-container {
        padding: 20px 15px !important;
        flex-direction: column; /* Stack vertically */
        gap: 20px;
    }

    .page-blog__hero-content {
        text-align: center;
        min-width: unset;
        width: 100%;
    }

    .page-blog__hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem); /* Smaller H1 on mobile */
        margin-bottom: 15px;
    }

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

    .page-blog__hero-cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px; /* Add padding to button container */
    }

    .page-blog__cta-button {
        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 {
        min-width: unset;
        width: 100%;
        order: -1; /* Image above content */
    }

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

    /* Intro Section Mobile */
    .page-blog__intro-section {
        padding: 30px 0;
    }

    /* Blog Posts Section Mobile */
    .page-blog__posts-section {
        padding: 30px 0;
    }

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

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

    .page-blog__post-thumbnail {
        height: 180px; /* Consistent height for mobile */
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Ensure responsiveness */
    }

    .page-blog__post-content {
        height: auto; /* Allow content to adjust height */
    }

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

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

    .page-blog__view-all-button-container {
        margin-top: 30px;
    }

    /* FAQ Section Mobile */
    .page-blog__faq-section {
        padding: 30px 0;
    }

    .page-blog__faq-item {
        margin-bottom: 10px;
    }

    .page-blog__faq-item summary {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-blog__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95em;
    }

    /* Generic Image and Container Mobile */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !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;
    }
}