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

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

.page-blog__top-section {
    padding-top: 10px; /* Small top padding, relying on body padding-top for header offset */
    padding-bottom: 50px;
    text-align: center;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.page-blog__main-title {
    font-size: 2.8em;
    color: #26A9E0;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    max-width: 800px; /* Constrain H1 width for better readability */
    margin-left: auto;
    margin-right: auto;
}

.page-blog__intro-text {
    font-size: 1.1em;
    color: #555555;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

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

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

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

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

.page-blog__section-title {
    font-size: 2em;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
    font-weight: 700;
}

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

.page-blog__articles-section,
.page-blog__why-read-section,
.page-blog__categories-section,
.page-blog__faq-section,
.page-blog__about-section,
.page-blog__conclusion-section {
    padding: 60px 0;
}

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

.page-blog__article-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-blog__article-figure {
    margin: 0;
    padding: 0;
    line-height: 0;
}

.page-blog__article-figure img {
    width: 100%;
    height: 400px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px;
}

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

.page-blog__article-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-blog__article-title a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #26A9E0;
}

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

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

.page-blog__read-more-link {
    color: #26A9E0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

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

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

.page-blog__view-all-btn {
    display: inline-block;
    background-color: #26A9E0;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__view-all-btn:hover {
    background-color: #1e87c2;
}

.page-blog__why-read-section p {
    font-size: 1.05em;
    margin-bottom: 30px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__benefit-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.page-blog__benefit-title {
    font-size: 1.25em;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-blog__benefit-item p {
    font-size: 0.95em;
    color: #555555;
}

.page-blog__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.page-blog__category-item {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s ease;
}

.page-blog__category-item:hover {
    transform: translateY(-3px);
}

.page-blog__category-title {
    font-size: 1.15em;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-blog__category-title a {
    color: #26A9E0;
    text-decoration: none;
}

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

.page-blog__category-item p {
    font-size: 0.9em;
    color: #666666;
}

.page-blog__promo-section {
    background-color: #26A9E0;
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-blog__promo-text {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__promo-figure {
    margin-top: 40px;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__promo-figure img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    min-height: 200px;
}

.page-blog__faq-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden;
}

.page-blog__faq-question {
    background-color: #f5f5f5;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    color: #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: #e0e0e0;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #26A9E0;
    margin-left: 10px;
}

.page-blog__faq-item--active .page-blog__faq-toggle {
    content: '-'; /* This is for CSS generated content, JS will handle actual text */
}

.page-blog__faq-answer {
    padding: 0 20px;
    color: #555555;
    font-size: 0.95em;
    line-height: 1.6;
    max-height: 0; /* Controlled by JS */
    overflow: hidden; /* Controlled by JS */
    transition: max-height 0.3s ease-out; /* Controlled by JS */
}

.page-blog__faq-item--active .page-blog__faq-answer {
    padding-top: 15px;
    padding-bottom: 20px;
    max-height: 2000px; /* Large enough to contain content */
    transition: max-height 0.5s ease-in-out;
}

.page-blog__about-text {
    font-size: 1.05em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__about-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-blog__conclusion-section {
    padding: 40px 0;
    background-color: #ffffff;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.page-blog__conclusion-text {
    font-size: 1.1em;
    color: #333333;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

    .page-blog__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 1. Top section title + dual CTA */
    .page-blog__top-section {
        padding-top: 10px !important; /* Rely on body padding-top, use small top padding here */
        padding-bottom: 30px;
    }

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

    .page-blog__intro-text {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .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;
    }

    /* 2. Single-column long article container (and other content sections) */
    .page-blog__articles-section,
    .page-blog__why-read-section,
    .page-blog__categories-section,
    .page-blog__faq-section,
    .page-blog__about-section,
    .page-blog__promo-section,
    .page-blog__conclusion-section {
        padding: 40px 0;
    }

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

    .page-blog__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-blog__article-card {
        margin-bottom: 20px;
    }

    .page-blog__article-title {
        font-size: 1.1em;
    }

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

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

    .page-blog__benefit-item,
    .page-blog__category-item {
        padding: 20px;
    }

    .page-blog__benefit-title,
    .page-blog__category-title {
        font-size: 1.1em;
    }

    .page-blog__promo-text {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-blog__about-text,
    .page-blog__conclusion-text {
        font-size: 1em;
    }

    .page-blog__about-cta {
        flex-direction: column;
        gap: 10px;
    }

    /* 3. General images and figure */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }

    .page-blog__article-figure img {
        height: 250px; /* Adjust height for mobile card images */
    }

    .page-blog__promo-figure img {
        height: auto !important;
    }

    /* 4. Buttons and button containers - already covered above with top-section CTA */

    /* 5. FAQ block */
    .page-blog__faq-question {
        font-size: 1em;
        padding: 12px 15px;
    }

    .page-blog__faq-answer {
        font-size: 0.9em;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__faq-item--active .page-blog__faq-answer {
        padding-top: 12px;
        padding-bottom: 15px;
    }
}

/* --- Mobile Responsive Styles (max-width: 480px) --- */
@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 1.8em;
    }

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

    .page-blog__article-figure img {
        height: 200px; /* Further adjust height for smaller mobile screens */
    }

    .page-blog__faq-question {
        font-size: 0.95em;
    }
}